geforkt von Mirrors/Paper
SPIGOT-602: Kick players with non-finite locations
Dieser Commit ist enthalten in:
Ursprung
ee6d0fa938
Commit
33d5de312e
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.419840293 +1100
|
--- ../work/decompile-8eb82bde/net/minecraft/server/PlayerConnection.java 2015-02-26 21:28:11.874168704 +1100
|
||||||
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.423840297 +1100
|
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-26 21:28:11.878168702 +1100
|
||||||
@@ -16,6 +16,48 @@
|
@@ -16,6 +16,48 @@
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -151,7 +151,7 @@
|
|||||||
public void a(PacketPlayInFlying packetplayinflying) {
|
public void a(PacketPlayInFlying packetplayinflying) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u());
|
||||||
+ // CraftBukkit start - Check for NaN
|
+ // CraftBukkit start - Check for NaN
|
||||||
+ if (Double.isNaN(packetplayinflying.x) || Double.isNaN(packetplayinflying.y) || Double.isNaN(packetplayinflying.z)) {
|
+ if (!NumberConversions.isFinite(packetplayinflying.x) || !NumberConversions.isFinite(packetplayinflying.y) || !NumberConversions.isFinite(packetplayinflying.z)) {
|
||||||
+ c.warn(player.getName() + " was caught trying to crash the server with an invalid position.");
|
+ c.warn(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||||
+ getPlayer().kickPlayer("Nope!");
|
+ getPlayer().kickPlayer("Nope!");
|
||||||
+ return;
|
+ return;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren