Skip to content

Instantly share code, notes, and snippets.

@EdGruberman
Last active December 15, 2015 13:09
Show Gist options
  • Save EdGruberman/5265726 to your computer and use it in GitHub Desktop.
Save EdGruberman/5265726 to your computer and use it in GitHub Desktop.
Bukkit/CraftBukkit#944 NetworkManager
public void a(String s, Object... aobject) {
// CraftBukkit start - This method is left to satisfy the interface in INetworkManager (which is used for MemoryNetworkManager). If this is called, QuitReason.UNKNOWN will be passed to it.
this.a(s, QuitReason.UNKNOWN, aobject);
}
public void a(String s, QuitReason r, Object... aobject) { // inserted QuitReason parameter
if (this.m) this.reason = r;
// CraftBukkit end
if (this.m) {
this.n = true;
this.v = s;
this.w = aobject;
this.m = false;
(new NetworkMasterThread(this)).start();
try {
this.input.close();
} catch (Throwable throwable) {
;
}
try {
this.output.close();
} catch (Throwable throwable1) {
;
}
try {
this.socket.close();
} catch (Throwable throwable2) {
;
}
this.input = null;
this.output = null;
this.socket = null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment