mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user