package oe.lib.util;

import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemInWorldManager;
import net.minecraft.server.MinecraftServer;
import net.minecraft.stats.StatBase;
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;

public class FakePlayer extends EntityPlayerMP {
  public FakePlayer(World world, String name) {
    super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, name, new ItemInWorldManager(world));
  }
  
  public void sendChatToPlayer(String s) {
  }
  
  public boolean canCommandSenderUseCommand(int i, String s) {
    return false;
  }
  
  public ChunkCoordinates getPlayerCoordinates() {
    return new ChunkCoordinates(0, 0, 0);
  }
  
  @Override
  public void sendChatToPlayer(ChatMessageComponent chatmessagecomponent) {
  }
  
  public static class OEFakePlayer extends FakePlayer {
    
    public OEFakePlayer() {
      this("[OE]");
    }
    
    public OEFakePlayer(String str) {
      super(MinecraftServer.getServer().worldServers[0], str);
    }
    
    public void addStat(StatBase par1StatBase, int par2) {
    }
  }
}

@@ -111,56 +111,162 @@
 ayer
-MP;%0Aimport net.minecraft.item.ItemInWorldManager
+;%0Aimport net.minecraft.entity.player.EntityPlayerMP;%0Aimport net.minecraft.item.ItemInWorldManager;%0Aimport net.minecraft.network.packet.Packet204ClientInfo
 ;%0Aim
@@ -437,16 +437,56 @@
 inates;%0A
+import net.minecraft.util.DamageSource;%0A
 import n
@@ -1054,32 +1054,667 @@
 onent) %7B%0A  %7D%0A  %0A
+  public void addStat(StatBase par1StatBase, int par2) %7B%0A  %7D%0A  %0A  @Override%0A  public void openGui(Object mod, int modGuiId, World world, int x, int y, int z) %7B%0A  %7D%0A  %0A  @Override%0A  public boolean isEntityInvulnerable() %7B%0A    return true;%0A  %7D%0A  %0A  @Override%0A  public boolean canAttackPlayer(EntityPlayer player) %7B%0A    return false;%0A  %7D%0A  %0A  @Override%0A  public void onDeath(DamageSource source) %7B%0A    return;%0A  %7D%0A  %0A  @Override%0A  public void onUpdate() %7B%0A    return;%0A  %7D%0A  %0A  @Override%0A  public void travelToDimension(int dim) %7B%0A    return;%0A  %7D%0A  %0A  @Override%0A  public void updateClientInfo(Packet204ClientInfo pkt) %7B%0A    return;%0A  %7D%0A  %0A
   public static 
@@ -1928,78 +1928,8 @@
   %7D%0A
-    %0A    public void addStat(StatBase par1StatBase, int par2) %7B%0A    %7D%0A
   %7D%0A

Update Fake Player, based on Forge's fake player