public CraftNPC(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager iteminworldmanager) {
super(minecraftserver, world, s, iteminworldmanager);
iteminworldmanager.setGameMode(EnumGamemode.SURVIVAL);
NPCSocket socket = new NPCSocket();
NetworkManager netMgr;
try {
netMgr = new NPCNetworkManager(server.getLogger(), socket, "npc mgr", new Connection() {
@Override
public boolean a() {
return false;
}
}, server.H().getPrivate());
this.playerConnection = new NPCNetHandler(minecraftserver, this, netMgr);
netMgr.a(this.playerConnection);
} catch (IOException e) {
e.printStackTrace();
}
try {
socket.close();