3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-22 06:20:06 +01:00

Descriptive kick reasons instead of Nope!

Dieser Commit ist enthalten in:
drXor 2019-01-05 16:21:07 +11:00 committet von md_5
Ursprung b021230837
Commit f2746a5eb2
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -85,7 +85,7 @@
+ if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) { + if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
+ if (this instanceof EntityPlayer) { + if (this instanceof EntityPlayer) {
+ this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw"); + this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Nope"); + ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite yaw (Hacking?)");
+ } + }
+ f = 0; + f = 0;
+ } + }
@ -98,7 +98,7 @@
+ if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) { + if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
+ if (this instanceof EntityPlayer) { + if (this instanceof EntityPlayer) {
+ this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch"); + this.world.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Nope"); + ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite pitch (Hacking?)");
+ } + }
+ f1 = 0; + f1 = 0;
+ } + }

Datei anzeigen

@ -824,7 +824,7 @@
this.player.resetIdleTimer(); this.player.resetIdleTimer();
} else { } else {
PlayerConnection.LOGGER.warn("{} tried to set an invalid carried item", this.player.getDisplayName().getString()); PlayerConnection.LOGGER.warn("{} tried to set an invalid carried item", this.player.getDisplayName().getString());
+ this.disconnect("Nope!"); // CraftBukkit + this.disconnect("Invalid hotbar selection (Hacking?)"); // CraftBukkit
} }
} }