mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-30 22:53:24 +01:00
Throw IOException
This commit is contained in:
parent
1ee4274bb5
commit
634dd441cb
@ -87,15 +87,20 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
|
|
||||||
private void initialise(MinecraftServer minecraftServer) {
|
private void initialise(MinecraftServer minecraftServer) {
|
||||||
Socket socket = new EmptySocket();
|
Socket socket = new EmptySocket();
|
||||||
NetworkManager netMgr = new EmptyNetworkManager(socket, "npc mgr", new NetHandler() {
|
NetworkManager netMgr = null;
|
||||||
|
try {
|
||||||
|
netMgr = new EmptyNetworkManager(socket, "npc mgr", new NetHandler() {
|
||||||
@Override
|
@Override
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, server.E().getPrivate());
|
}, server.E().getPrivate());
|
||||||
|
|
||||||
netServerHandler = new EmptyNetHandler(minecraftServer, netMgr, this);
|
netServerHandler = new EmptyNetHandler(minecraftServer, netMgr, this);
|
||||||
netMgr.a(netServerHandler);
|
netMgr.a(netServerHandler);
|
||||||
|
} catch (IOException e) {
|
||||||
|
// swallow
|
||||||
|
}
|
||||||
|
|
||||||
W = STEP_HEIGHT; // fix moving up slabs and steps
|
W = STEP_HEIGHT; // fix moving up slabs and steps
|
||||||
getNavigation().e(true);
|
getNavigation().e(true);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.npc.network;
|
package net.citizensnpcs.npc.network;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.security.PrivateKey;
|
import java.security.PrivateKey;
|
||||||
|
|
||||||
@ -10,7 +11,8 @@ import net.minecraft.server.Packet;
|
|||||||
|
|
||||||
public class EmptyNetworkManager extends NetworkManager {
|
public class EmptyNetworkManager extends NetworkManager {
|
||||||
|
|
||||||
public EmptyNetworkManager(Socket socket, String string, NetHandler netHandler, PrivateKey key) {
|
public EmptyNetworkManager(Socket socket, String string, NetHandler netHandler, PrivateKey key)
|
||||||
|
throws IOException {
|
||||||
super(socket, string, netHandler, key);
|
super(socket, string, netHandler, key);
|
||||||
|
|
||||||
NMS.stopNetworkThreads(this);
|
NMS.stopNetworkThreads(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user