mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 21:33:49 -07:00
@@ -0,0 +1,37 @@
|
||||
From 38a056dfb5e58b7716c5afa8bde3cbfdbcb45474 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sun, 9 Feb 2014 14:39:01 +1100
|
||||
Subject: [PATCH] Add Option to Silence CommandBlock Console
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
index e63f17c..e2389d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -82,7 +82,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
|
||||
}
|
||||
}
|
||||
|
||||
- if (icommandlistener != MinecraftServer.getServer()) {
|
||||
+ if (icommandlistener != MinecraftServer.getServer() && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
|
||||
MinecraftServer.getServer().sendMessage(chatmessage);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 8da3cc9..7cba69f 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
@@ -261,4 +261,10 @@ public class SpigotConfig
|
||||
"/skill"
|
||||
} ) );
|
||||
}
|
||||
+
|
||||
+ public static boolean silentCommandBlocks;
|
||||
+ private static void silentCommandBlocks()
|
||||
+ {
|
||||
+ silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
|
Reference in New Issue
Block a user