mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 07:02:18 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
--- a/net/minecraft/server/CommandDebug.java
|
||||
+++ b/net/minecraft/server/CommandDebug.java
|
||||
@@ -34,6 +34,14 @@
|
||||
@@ -35,6 +35,14 @@
|
||||
}
|
||||
|
||||
public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException {
|
||||
private static int a(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
|
||||
+ // 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;
|
||||
+ if (!commandlistenerwrapper.getServer().methodProfiler.ENABLED) {
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("Vanilla debug profiling is disabled."));
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("To enable, restart the server with `-DenableDebugMethodProfiler=true' before `-jar'."));
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("Use `/timings' for plugin timings."));
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (astring.length < 1) {
|
||||
throw new ExceptionUsage("commands.debug.usage", new Object[0]);
|
||||
} else {
|
||||
@@ -142,6 +150,13 @@
|
||||
MinecraftServer minecraftserver = commandlistenerwrapper.getServer();
|
||||
MethodProfiler methodprofiler = minecraftserver.methodProfiler;
|
||||
|
||||
@@ -48,6 +56,14 @@
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
private static int b(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
|
||||
+ // CraftBukkit start - only allow use when enabled (so that no blank profile results occur)
|
||||
+ if (!commandlistenerwrapper.getServer().methodProfiler.ENABLED) {
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("Vanilla debug profiling is disabled."));
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("To enable, restart the server with `-DenableDebugMethodProfiler=true' before `-jar'."));
|
||||
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText("Use `/timings' for plugin timings."));
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
MinecraftServer minecraftserver = commandlistenerwrapper.getServer();
|
||||
MethodProfiler methodprofiler = minecraftserver.methodProfiler;
|
||||
|
||||
|
Reference in New Issue
Block a user