45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
|
--- ../src-base/minecraft/net/minecraftforge/common/util/FakePlayer.java
|
||
|
+++ ../src-work/minecraft/net/minecraftforge/common/util/FakePlayer.java
|
||
|
@@ -3,9 +3,11 @@
|
||
|
import com.mojang.authlib.GameProfile;
|
||
|
|
||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||
|
+import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||
|
import net.minecraft.entity.player.EntityPlayer;
|
||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||
|
import net.minecraft.network.play.client.C15PacketClientSettings;
|
||
|
+import net.minecraft.server.MinecraftServer;
|
||
|
import net.minecraft.server.management.ItemInWorldManager;
|
||
|
import net.minecraft.stats.StatBase;
|
||
|
import net.minecraft.util.ChunkCoordinates;
|
||
|
@@ -13,13 +15,29 @@
|
||
|
import net.minecraft.util.IChatComponent;
|
||
|
import net.minecraft.world.World;
|
||
|
import net.minecraft.world.WorldServer;
|
||
|
+import net.minecraftforge.cauldron.configuration.CauldronConfig;
|
||
|
+import net.minecraftforge.event.ForgeEventFactory;
|
||
|
|
||
|
+import java.util.ArrayList;
|
||
|
+import java.util.HashSet;
|
||
|
+import java.util.concurrent.ConcurrentSkipListSet;
|
||
|
+
|
||
|
//Preliminary, simple Fake Player class
|
||
|
public class FakePlayer extends EntityPlayerMP
|
||
|
{
|
||
|
+ static public ArrayList<FakePlayer> fakePlayers=new ArrayList<>();
|
||
|
+ static public boolean BukkitInited=false;
|
||
|
public FakePlayer(WorldServer world, GameProfile name)
|
||
|
{
|
||
|
super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, name, new ItemInWorldManager(world));
|
||
|
+ //KCauldronX Start
|
||
|
+ if(MinecraftServer.cauldronConfig.fakePlayerLogin.getValue())
|
||
|
+ if(!BukkitInited) {
|
||
|
+ fakePlayers.add(this);
|
||
|
+ }else{
|
||
|
+ PlayerEvent.PlayerLoggedInEvent join=new PlayerEvent.PlayerLoggedInEvent(this);
|
||
|
+ }
|
||
|
+ //KCauldronX End
|
||
|
}
|
||
|
|
||
|
@Override public boolean canCommandSenderUseCommand(int i, String s){ return false; }
|