Add Option to Silence CommandBlock Console

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2014-02-09 14:39:01 +11:00
parent ff6d4b2d90
commit c3ce457c08
2 changed files with 14 additions and 1 deletions

View file

@ -39,7 +39,7 @@
public Vec3 getPosition() {
return this.worldPosition;
@@ -302,7 +318,7 @@
@@ -302,13 +318,13 @@
while (iterator.hasNext()) {
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
@ -48,6 +48,13 @@
entityplayer.sendSystemMessage(ichatmutablecomponent);
}
}
}
- if (this.source != this.server && this.server.getGameRules().getBoolean(GameRules.RULE_LOGADMINCOMMANDS)) {
+ if (this.source != this.server && this.server.getGameRules().getBoolean(GameRules.RULE_LOGADMINCOMMANDS) && !org.spigotmc.SpigotConfig.silentCommandBlocks) { // Spigot
this.server.sendSystemMessage(ichatmutablecomponent);
}
@@ -400,4 +416,10 @@
public boolean isSilent() {
return this.silent;

View file

@ -294,4 +294,10 @@ public class SpigotConfig
"/skill"
} ) );
}
public static boolean silentCommandBlocks;
private static void silentCommandBlocks()
{
SpigotConfig.silentCommandBlocks = SpigotConfig.getBoolean( "commands.silent-commandblock-console", false );
}
}