Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
33 Zeilen
1.6 KiB
Diff
33 Zeilen
1.6 KiB
Diff
|
--- a/net/minecraft/server/CommandDebug.java
|
||
|
+++ b/net/minecraft/server/CommandDebug.java
|
||
|
@@ -32,6 +32,14 @@
|
||
|
}
|
||
|
|
||
|
public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException {
|
||
|
+ // CraftBukkit start - only allow use when enabled (so that no blank profile results occur)
|
||
|
+ if (!minecraftserver.methodProfiler.ENABLED) {
|
||
|
+ icommandlistener.sendMessage(new ChatComponentText("Vanilla debug profiling is disabled."));
|
||
|
+ icommandlistener.sendMessage(new ChatComponentText("To enable, restart the server with `-DenableDebugMethodProfiler=true' before `-jar'."));
|
||
|
+ icommandlistener.sendMessage(new ChatComponentText("Use `/timings' for plugin timings."));
|
||
|
+ return;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
if (astring.length < 1) {
|
||
|
throw new ExceptionUsage("commands.debug.usage", new Object[0]);
|
||
|
} else {
|
||
|
@@ -140,6 +148,13 @@
|
||
|
}
|
||
|
|
||
|
public List<String> tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, @Nullable BlockPosition blockposition) {
|
||
|
- return astring.length == 1 ? a(astring, new String[] { "start", "stop"}) : Collections.emptyList();
|
||
|
+ return astring.length == 1 ? a(astring, new String[] { "start", "stop"}) : Collections.<String>emptyList(); // CraftBukkit - decompile error
|
||
|
+ }
|
||
|
+
|
||
|
+ // CraftBukkit start - fix decompile error
|
||
|
+ @Override
|
||
|
+ public int compareTo(ICommand o) {
|
||
|
+ return a((ICommand) o);
|
||
|
}
|
||
|
+ // CraftBukkit end
|
||
|
}
|