SPIGOT-1055: Send empty string when RCON command is cancelled.
Drops the RemoteControlSession patch as the decompiled code is a mess.
Dieser Commit ist enthalten in:
Ursprung
bf4818b94a
Commit
3d5ab8fca9
@ -224,7 +224,7 @@
|
|||||||
+ RemoteServerCommandEvent event = new RemoteServerCommandEvent(remoteConsole, s);
|
+ RemoteServerCommandEvent event = new RemoteServerCommandEvent(remoteConsole, s);
|
||||||
+ server.getPluginManager().callEvent(event);
|
+ server.getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ return null;
|
+ return "";
|
||||||
+ }
|
+ }
|
||||||
+ // Event change end
|
+ // Event change end
|
||||||
+ ServerCommand serverCommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.getInstance());
|
+ ServerCommand serverCommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.getInstance());
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
--- a/net/minecraft/server/RemoteControlSession.java
|
|
||||||
+++ b/net/minecraft/server/RemoteControlSession.java
|
|
||||||
@@ -32,8 +32,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run() {
|
|
||||||
- while (true) {
|
|
||||||
- try {
|
|
||||||
+ try { // CraftBukkit // PAIL: FF issue
|
|
||||||
+ while (true) { // CraftBukkit // PAIL: FF issue
|
|
||||||
if (!this.a) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -62,7 +62,10 @@
|
|
||||||
String s = StatusChallengeUtils.a(this.k, k, i);
|
|
||||||
|
|
||||||
try {
|
|
||||||
- this.a(l, this.b.executeRemoteCommand(s));
|
|
||||||
+ // CraftBukkit start
|
|
||||||
+ String result = this.b.executeRemoteCommand(s);
|
|
||||||
+ if (result != null) this.a(l, result);
|
|
||||||
+ // CraftBukkit end
|
|
||||||
} catch (Exception exception) {
|
|
||||||
this.a(l, "Error executing: " + s + " (" + exception.getMessage() + ")");
|
|
||||||
}
|
|
||||||
@@ -90,20 +93,20 @@
|
|
||||||
this.a(l, String.format("Unknown request %s", new Object[] { Integer.toHexString(i1)}));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
- }
|
|
||||||
+ } }
|
|
||||||
} catch (SocketTimeoutException sockettimeoutexception) {
|
|
||||||
- break;
|
|
||||||
+ // break; // CraftBukkit // PAIL: FF issue
|
|
||||||
} catch (IOException ioexception) {
|
|
||||||
- break;
|
|
||||||
+ // break; // CraftBukkit // PAIL: FF issue
|
|
||||||
} catch (Exception exception1) {
|
|
||||||
RemoteControlSession.h.error("Exception whilst parsing RCON input", exception1);
|
|
||||||
- break;
|
|
||||||
+ // break; // CraftBukkit // PAIL: FF issue
|
|
||||||
} finally {
|
|
||||||
this.g();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
- }
|
|
||||||
+ // } // CraftBukkit // PAIL: FF issue
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
In neuem Issue referenzieren
Einen Benutzer sperren