Commits
md_5 authored 33d5de312e9
1 - | --- ../work/decompile-8eb82bde/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.419840293 +1100 |
2 - | +++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-20 15:17:19.423840297 +1100 |
1 + | --- ../work/decompile-8eb82bde/net/minecraft/server/PlayerConnection.java 2015-02-26 21:28:11.874168704 +1100 |
2 + | +++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-26 21:28:11.878168702 +1100 |
3 3 | |
4 4 | import org.apache.logging.log4j.LogManager; |
5 5 | import org.apache.logging.log4j.Logger; |
6 6 | |
7 7 | +// CraftBukkit start |
8 8 | +import java.util.concurrent.ExecutionException; |
9 9 | +import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; |
10 10 | +import java.util.HashSet; |
11 11 | + |
12 12 | +import org.bukkit.craftbukkit.entity.CraftPlayer; |
144 144 | - Futures.getUnchecked(this.minecraftServer.postToMainThread(new PlayerConnectionDisconnector(this))); |
145 145 | + this.minecraftServer.postToMainThread(new PlayerConnectionDisconnector(this)); // CraftBukkit - Don't wait |
146 146 | } |
147 147 | |
148 148 | public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) { |
149 149 | |
150 150 | |
151 151 | public void a(PacketPlayInFlying packetplayinflying) { |
152 152 | PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u()); |
153 153 | + // CraftBukkit start - Check for NaN |
154 - | + if (Double.isNaN(packetplayinflying.x) || Double.isNaN(packetplayinflying.y) || Double.isNaN(packetplayinflying.z)) { |
154 + | + if (!NumberConversions.isFinite(packetplayinflying.x) || !NumberConversions.isFinite(packetplayinflying.y) || !NumberConversions.isFinite(packetplayinflying.z)) { |
155 155 | + c.warn(player.getName() + " was caught trying to crash the server with an invalid position."); |
156 156 | + getPlayer().kickPlayer("Nope!"); |
157 157 | + return; |
158 158 | + } |
159 159 | + // CraftBukkit end |
160 160 | WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); |
161 161 | |
162 162 | this.h = true; |
163 163 | |
164 164 | this.checkMovement = true; |