mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:00:02 +03:00
26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/command/CommandDebug.java
|
|
+++ ../src-work/minecraft/net/minecraft/command/CommandDebug.java
|
|
@@ -13,6 +13,7 @@
|
|
import net.minecraft.profiler.Profiler;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.util.math.BlockPos;
|
|
+import net.minecraft.util.text.TextComponentString;
|
|
import org.apache.commons.io.IOUtils;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
@@ -40,6 +41,14 @@
|
|
|
|
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
|
|
{
|
|
+ // CraftBukkit start - only allow use when enabled (so that no blank profile results occur)
|
|
+ if (!server.profiler.ENABLED) {
|
|
+ sender.sendMessage(new TextComponentString("Vanilla debug profiling is disabled."));
|
|
+ sender.sendMessage(new TextComponentString("To enable, restart the server with `-DenableDebugMethodProfiler=true' before `-jar'."));
|
|
+ sender.sendMessage(new TextComponentString("Use `/timings' for plugin timings."));
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
if (args.length < 1)
|
|
{
|
|
throw new WrongUsageException("commands.debug.usage", new Object[0]);
|