diff --git a/Bukkit-Patches/0001-POM-Changes.patch b/Bukkit-Patches/0001-POM-Changes.patch index dd1fc367b4..e05dc41d73 100644 --- a/Bukkit-Patches/0001-POM-Changes.patch +++ b/Bukkit-Patches/0001-POM-Changes.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - bukkit + org.spigotmc + spigot-api - 1.8.4-R0.1-SNAPSHOT + 1.8.5-R0.1-SNAPSHOT jar - Bukkit diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index bf15c0809b..fb92a28183 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + org.spigotmc + spigot jar - 1.8.4-R0.1-SNAPSHOT + 1.8.5-R0.1-SNAPSHOT - CraftBukkit - http://www.bukkit.org + Spigot diff --git a/CraftBukkit-Patches/0029-Configurable-Messages.patch b/CraftBukkit-Patches/0029-Configurable-Messages.patch index 9667bca829..c7f531933b 100644 --- a/CraftBukkit-Patches/0029-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0029-Configurable-Messages.patch @@ -12,13 +12,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end if (packethandshakinginsetprotocol.b() > 47) { -- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.4"); -+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.4" ) ); // Spigot +- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.5"); ++ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.5" ) ); // Spigot this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext)); this.b.close(chatcomponenttext); } else if (packethandshakinginsetprotocol.b() < 47) { -- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.4"); -+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.4" ) ); // Spigot +- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.5"); ++ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.5" ) ); // Spigot this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext)); this.b.close(chatcomponenttext); } else { diff --git a/CraftBukkit-Patches/0044-Don-t-Special-Case-X-Move-Value.patch b/CraftBukkit-Patches/0044-Don-t-Special-Case-X-Move-Value.patch index 9173841709..0302b20e92 100644 --- a/CraftBukkit-Patches/0044-Don-t-Special-Case-X-Move-Value.patch +++ b/CraftBukkit-Patches/0044-Don-t-Special-Case-X-Move-Value.patch @@ -17,31 +17,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CraftPlayer getPlayer() { return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity(); @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList - } - // CraftBukkit start - fire PlayerMoveEvent - Player player = this.getPlayer(); -+ // Spigot Start -+ if ( !hasMoved ) -+ { -+ Location curPos = player.getLocation(); -+ lastPosX = curPos.getX(); -+ lastPosY = curPos.getY(); -+ lastPosZ = curPos.getZ(); -+ lastYaw = curPos.getYaw(); -+ lastPitch = curPos.getPitch(); -+ hasMoved = true; -+ } -+ // Spigot End - Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location. - Location to = player.getLocation().clone(); // Start off the To location as the Players current location. + } + // CraftBukkit start - fire PlayerMoveEvent + Player player = this.getPlayer(); ++ // Spigot Start ++ if ( !hasMoved ) ++ { ++ Location curPos = player.getLocation(); ++ lastPosX = curPos.getX(); ++ lastPosY = curPos.getY(); ++ lastPosZ = curPos.getZ(); ++ lastYaw = curPos.getYaw(); ++ lastPitch = curPos.getPitch(); ++ hasMoved = true; ++ } ++ // Spigot End + Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location. + Location to = player.getLocation().clone(); // Start off the To location as the Players current location. @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList - this.lastPitch = to.getPitch(); + this.lastPitch = to.getPitch(); - // Skip the first time we do this -- if (from.getX() != Double.MAX_VALUE) { -+ if (true) { // Spigot - don't skip any move events - Location oldTo = to.clone(); - PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); - this.server.getPluginManager().callEvent(event); + // Skip the first time we do this +- if (from.getX() != Double.MAX_VALUE) { ++ if (true) { // Spigot - don't skip any move events + Location oldTo = to.clone(); + PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); + this.server.getPluginManager().callEvent(event); -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch index 335533a59a..2976e6c30b 100644 --- a/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0073-Highly-Optimized-Tick-Loop.patch @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 try { if (this.init()) { @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs - this.r.setServerInfo(new ServerPing.ServerData("1.8.4", 47)); + this.r.setServerInfo(new ServerPing.ServerData("1.8.5", 47)); this.a(this.r); + // Spigot start diff --git a/CraftBukkit-Patches/0094-Descriptive-kick-reasons-instead-of-Nope.patch b/CraftBukkit-Patches/0094-Descriptive-kick-reasons-instead-of-Nope.patch index f90d2c5702..b729ec892c 100644 --- a/CraftBukkit-Patches/0094-Descriptive-kick-reasons-instead-of-Nope.patch +++ b/CraftBukkit-Patches/0094-Descriptive-kick-reasons-instead-of-Nope.patch @@ -30,15 +30,6 @@ diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList - || !NumberConversions.isFinite(packetplayinflying.yaw) - || !NumberConversions.isFinite(packetplayinflying.pitch)) { - c.warn(player.getName() + " was caught trying to crash the server with an invalid position."); -- getPlayer().kickPlayer("Nope!"); -+ getPlayer().kickPlayer("NaN in position (Hacking?)"); //Spigot "Nope" -> Descriptive reason - return; - } - // CraftBukkit end @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList this.player.resetIdleTimer(); } else { diff --git a/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch b/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch index 9ccb19bc40..2346256e9c 100644 --- a/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch +++ b/CraftBukkit-Patches/0135-Make-moved-wrongly-limit-configurable.patch @@ -9,15 +9,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList - d15 = d11 * d11 + d12 * d12 + d13 * d13; - boolean flag1 = false; + d15 = d11 * d11 + d12 * d12 + d13 * d13; + boolean flag1 = false; -- if (d15 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) { -+ // Spigot: make "moved wrongly" limit configurable -+ if (d15 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) { - flag1 = true; - PlayerConnection.c.warn(this.player.getName() + " moved wrongly!"); - } +- if (d15 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) { ++ // Spigot: make "moved wrongly" limit configurable ++ if (d15 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) { + flag1 = true; + PlayerConnection.c.warn(this.player.getName() + " moved wrongly!"); + } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch b/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch index be7f7bc636..d826a7e803 100644 --- a/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch +++ b/CraftBukkit-Patches/0137-Make-moved-too-quickly-limit-configurable.patch @@ -9,15 +9,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList - double d14 = this.player.motX * this.player.motX + this.player.motY * this.player.motY + this.player.motZ * this.player.motZ; - double d15 = d11 * d11 + d12 * d12 + d13 * d13; + double d14 = this.player.motX * this.player.motX + this.player.motY * this.player.motY + this.player.motZ * this.player.motZ; + double d15 = d11 * d11 + d12 * d12 + d13 * d13; -- if (d15 - d14 > 100.0D && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports -+ // Spigot: make "moved too quickly" limit configurable -+ if (d15 - d14 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports - PlayerConnection.c.warn(this.player.getName() + " moved too quickly! " + d11 + "," + d12 + "," + d13 + " (" + d11 + ", " + d12 + ", " + d13 + ")"); - this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch); - return; +- if (d15 - d14 > 100.0D && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports ++ // Spigot: make "moved too quickly" limit configurable ++ if (d15 - d14 > org.spigotmc.SpigotConfig.movedTooQuicklyThreshold && this.checkMovement && (!this.minecraftServer.T() || !this.minecraftServer.S().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports + PlayerConnection.c.warn(this.player.getName() + " moved too quickly! " + d11 + "," + d12 + "," + d13 + " (" + d11 + ", " + d12 + ", " + d13 + ")"); + this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch); + return; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java