mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Add Option to Silence CommandBlock Console
By: md_5 <git@md-5.net>
This commit is contained in:
parent
ff6d4b2d90
commit
c3ce457c08
2 changed files with 14 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue