geforkt von Mirrors/Paper
Update to 1.8.5
Dieser Commit ist enthalten in:
Ursprung
56edb22600
Commit
f15e313938
@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <artifactId>bukkit</artifactId>
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot-api</artifactId>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.5-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Bukkit</name>
|
||||
|
@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.5-R0.1-SNAPSHOT</version>
|
||||
- <name>CraftBukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot</name>
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
--
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren