diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-09-23 16:43:21 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-10-23 20:22:30 -0400 |
commit | bd1389895b2959eec6f0509c265dbecbfb549b64 (patch) | |
tree | d402db6bd6991adc4cb17d2bbbbee85f25bdf954 /src/main/java/net/minecraft/server/PlayerConnection.java | |
parent | de16ba6eecbaaa5808e31e8122e10c7450e4d03e (diff) | |
download | craftbukkit-bd1389895b2959eec6f0509c265dbecbfb549b64.tar craftbukkit-bd1389895b2959eec6f0509c265dbecbfb549b64.tar.gz craftbukkit-bd1389895b2959eec6f0509c265dbecbfb549b64.tar.lz craftbukkit-bd1389895b2959eec6f0509c265dbecbfb549b64.tar.xz craftbukkit-bd1389895b2959eec6f0509c265dbecbfb549b64.zip |
Add auto-save plugin redundancy detection.
This change will print a warning when a plugin induces a forced save. A
player or console forcing a save (via a command) is ignored for purposes
of printing a warning.
Diffstat (limited to 'src/main/java/net/minecraft/server/PlayerConnection.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index a5d7500a..e4cb5c76 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -831,7 +831,16 @@ public class PlayerConnection extends Connection { return; } - this.chat(s, packet3chat.a_()); + if (!packet3chat.a_()) { + try { + this.minecraftServer.server.playerCommandState = true; + this.chat(s, packet3chat.a_()); + } finally { + this.minecraftServer.server.playerCommandState = false; + } + } else { + this.chat(s, packet3chat.a_()); + } // This section stays because it is only applicable to packets if (chatSpamField.addAndGet(this, 20) > 200 && !this.minecraftServer.getPlayerList().isOp(this.player.getName())) { // CraftBukkit use thread-safe spam |