SteamWar/SpigotCore
Archiviert
13
0

Fix NoCom detection (dropping blocks)
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2023-02-17 15:34:08 +01:00
Ursprung d3c27dd0f2
Commit 022b0983b6

Datei anzeigen

@ -40,7 +40,7 @@ public class AntiNocom {
Object pos = digPosition.get(packet); Object pos = digPosition.get(packet);
int x = TechHider.blockPositionX.get(pos); int x = TechHider.blockPositionX.get(pos);
int z = TechHider.blockPositionZ.get(pos); int z = TechHider.blockPositionZ.get(pos);
if(!player.getWorld().isChunkLoaded(ProtocolUtils.posToChunk(x), ProtocolUtils.posToChunk(z))) { if((x != 0 || z != 0) && !player.getWorld().isChunkLoaded(ProtocolUtils.posToChunk(x), ProtocolUtils.posToChunk(z))) {
Bukkit.getScheduler().runTask(Core.getInstance(), () -> player.kickPlayer(null)); Bukkit.getScheduler().runTask(Core.getInstance(), () -> player.kickPlayer(null));
SWException.log(player.getName() + " kicked for digging an unloaded block (potential NoCom-DOS attack)", x + " " + z); SWException.log(player.getName() + " kicked for digging an unloaded block (potential NoCom-DOS attack)", x + " " + z);
return null; return null;