Server Commands and Remote Commands are now Cancellable.

By: Matt <mattbdev@outlook.com>
This commit is contained in:
CraftBukkit/Spigot
2015-07-12 19:54:34 +10:00
parent af2b41da07
commit b201f850d6
3 changed files with 51 additions and 38 deletions

View File

@@ -0,0 +1,14 @@
--- a/net/minecraft/server/RemoteControlSession.java
+++ b/net/minecraft/server/RemoteControlSession.java
@@ -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() + ")");
}