Patch rebuild

This commit is contained in:
Thinkofdeath 2015-04-05 16:09:21 +01:00 committed by Zach Brown
parent 0b9296ab07
commit aa1203137a
12 changed files with 45 additions and 45 deletions

View File

@ -1,4 +1,4 @@
From b2f4b5f64bd93400de5fdfa33cb672c101a8e7bb Mon Sep 17 00:00:00 2001
From d267e0bbeda92233412bb5ff4b023a58cb1e9a5a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 Jan 2013 00:18:11 -0500
Subject: [PATCH] Spigot Timings
@ -367,10 +367,10 @@ index 611a623..af2e9bc 100644
this.methodProfiler.b();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a25e980..3595861 100644
index 961a0aa..a273c82 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1061,6 +1061,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1065,6 +1065,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
private void handleCommand(String s) {
@ -378,7 +378,7 @@ index a25e980..3595861 100644
// CraftBukkit start - whole method
this.c.info(this.player.getName() + " issued server command: " + s);
@@ -1070,18 +1071,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1074,18 +1075,22 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {

View File

@ -1,14 +1,14 @@
From 54c5246ad26fa7f5728b2b26928e9e16f2ff2be8 Mon Sep 17 00:00:00 2001
From d304d562413754410e3abe8b4e46d011ae647a8c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:01:29 +1000
Subject: [PATCH] Allow Disabling of Command Logging
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 20e09e5..9afd03f 100644
index a273c82..2ad2dc3 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1063,6 +1063,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1067,6 +1067,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
private void handleCommand(String s) {
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
// CraftBukkit start - whole method

View File

@ -1,14 +1,14 @@
From 7c37d59b3f35e2214ee932c260c86aab90023d13 Mon Sep 17 00:00:00 2001
From fc1786cf0a69272c0c166fa0fd18d9d654035fad Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 28 Jun 2013 19:52:54 +1000
Subject: [PATCH] Disallow Interaction With Self
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9afd03f..a868a19 100644
index 2ad2dc3..f772206 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1198,6 +1198,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1202,6 +1202,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver);

View File

@ -1,11 +1,11 @@
From 54d62db063d3b9ba298516e607b102f49fa50576 Mon Sep 17 00:00:00 2001
From ea43fb936b0ab89fbd048c5d8b38ef75c5c92469 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 6 Oct 2013 17:36:28 +1100
Subject: [PATCH] Don't Special Case X Move Value
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index a868a19..9fa0e67 100644
index f772206..2eef96d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -109,6 +109,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@ -16,7 +16,7 @@ index a868a19..9fa0e67 100644
public CraftPlayer getPlayer() {
return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
@@ -219,6 +220,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -223,6 +224,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - fire PlayerMoveEvent
Player player = this.getPlayer();
@ -35,7 +35,7 @@ index a868a19..9fa0e67 100644
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.
@@ -247,7 +260,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -251,7 +264,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.lastPitch = to.getPitch();
// Skip the first time we do this

View File

@ -1,14 +1,14 @@
From c8c347b143db9269c2434ceb784074ef08245b73 Mon Sep 17 00:00:00 2001
From 2023613c08047278c22bd6d35401c507e43c6c87 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 8 Feb 2014 08:13:40 +0000
Subject: [PATCH] Spam Filter Exclusions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9fa0e67..e62c2f3 100644
index 2eef96d..2e191a2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -969,9 +969,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -973,9 +973,20 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.minecraftServer.getPlayerList().sendMessage(chatmessage1, false);
}

View File

@ -1,14 +1,14 @@
From 219bd2dcb4d9abb2a72b86382ed9cf62245b42a8 Mon Sep 17 00:00:00 2001
From 7615329ad3a2dd728c79f4f0c260506531dfb88d Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 12 Feb 2014 18:18:01 +1100
Subject: [PATCH] Allow Disabling Creative Item Filter
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e62c2f3..8fff72f 100644
index 2e191a2..7812c76 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1699,7 +1699,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1703,7 +1703,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
// CraftBukkit - Add invalidItems check

View File

@ -1,4 +1,4 @@
From 821df7abccb2676bf0af3461590833d7c7187f8a Mon Sep 17 00:00:00 2001
From 6031a2ba68cf9a1c6343ec5ad30e7f71931fd367 Mon Sep 17 00:00:00 2001
From: hcherndon <hcherndon@gmail.com>
Date: Sat, 15 Feb 2014 01:51:20 -0600
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
@ -6,10 +6,10 @@ Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
This would literally mean the world to me. You have no idea how much this method being final is fucking me over right now. (Working with NPC's and what not.)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8fff72f..b650419 100644
index 7812c76..cf450d2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2060,7 +2060,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -2064,7 +2064,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - Add "isDisconnected" method

View File

@ -1,4 +1,4 @@
From 6af2a4bcda059563d6d5eeb1d07368c7a41e6627 Mon Sep 17 00:00:00 2001
From 3bbab8fc14a1491c486bcf71b02711ce9c28a8dc Mon Sep 17 00:00:00 2001
From: drXor <mcyoungsota@gmail.com>
Date: Sat, 15 Mar 2014 01:30:05 -0400
Subject: [PATCH] Descriptive kick reasons instead of Nope!
@ -27,19 +27,19 @@ index 82accf4..d6bef0b 100644
f1 = 0;
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b650419..0bcdef4 100644
index cf450d2..80615cc 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -196,7 +196,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit start - Check for NaN
if (!NumberConversions.isFinite(packetplayinflying.x) || !NumberConversions.isFinite(packetplayinflying.y) || !NumberConversions.isFinite(packetplayinflying.z)) {
@@ -200,7 +200,7 @@ 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
@@ -892,7 +892,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -896,7 +896,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
this.player.z();
} else {
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");

View File

@ -1,4 +1,4 @@
From d343c83bea60fb9f8a5801682fa3d9d96a4c5ced Mon Sep 17 00:00:00 2001
From 06364455273ac49f9a08e52f32f8c9aa7477d0ee Mon Sep 17 00:00:00 2001
From: riking <rikingcoding@gmail.com>
Date: Wed, 14 May 2014 13:46:48 -0700
Subject: [PATCH] Process conversation input on the main thread. Fixes
@ -6,10 +6,10 @@ Subject: [PATCH] Process conversation input on the main thread. Fixes
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0bcdef4..ee6fa34 100644
index 80615cc..5465e12 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -954,7 +954,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -958,7 +958,18 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
} else if (s.isEmpty()) {
c.warn(this.player.getName() + " tried to send an empty message");
} else if (getPlayer().isConversing()) {

View File

@ -1,4 +1,4 @@
From 0c4bed4b7bcd2b27939a8d1324778f09fa2b5fc1 Mon Sep 17 00:00:00 2001
From e8bccef4eba23c484f9726b3217145b69c151ef6 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Sun, 29 Jun 2014 21:10:34 +0100
Subject: [PATCH] Limit block placement/interaction packets
@ -24,10 +24,10 @@ index c611db1..28cb5e3 100644
public void b(PacketDataSerializer packetdataserializer) throws IOException {}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index ee6fa34..d63c65d 100644
index 5465e12..0ab9b56 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -626,10 +626,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -630,10 +630,23 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
}
@ -52,7 +52,7 @@ index ee6fa34..d63c65d 100644
// CraftBukkit start
if (this.player.dead) return;
@@ -652,7 +665,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -656,7 +669,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit start
int itemstackAmount = itemstack.count;
@ -62,7 +62,7 @@ index ee6fa34..d63c65d 100644
// Raytrace to look for 'rogue armswings'
float f1 = this.player.pitch;
float f2 = this.player.yaw;
@@ -688,6 +702,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -692,6 +706,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
if (!cancelled) {
this.player.playerInteractManager.useItem(this.player, this.player.world, itemstack);
}
@ -71,7 +71,7 @@ index ee6fa34..d63c65d 100644
// CraftBukkit - notch decrements the counter by 1 in the above method with food,
// snowballs and so forth, but he does it in a place that doesn't cause the
@@ -713,7 +729,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -717,7 +733,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
if (this.checkMovement && this.player.e((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && !this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
@ -80,7 +80,7 @@ index ee6fa34..d63c65d 100644
}
flag = true;
@@ -1130,6 +1146,19 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -1134,6 +1150,19 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
public void a(PacketPlayInArmAnimation packetplayinarmanimation) {
if (this.player.dead) return; // CraftBukkit
PlayerConnectionUtils.ensureMainThread(packetplayinarmanimation, this, this.player.u());

View File

@ -1,14 +1,14 @@
From 03b75ce178b9997862c4d2c31cb506d5665ec0ed Mon Sep 17 00:00:00 2001
From 73cf2bf5293487be1a76c25190939bb1a0239913 Mon Sep 17 00:00:00 2001
From: Jonas Konrad <me@yawk.at>
Date: Fri, 4 Jul 2014 23:03:13 +0200
Subject: [PATCH] Make "moved wrongly" limit configurable
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b4b3cbc..2e5a55d 100644
index 0ab9b56..a550d80 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -416,7 +416,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -420,7 +420,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
d17 = d11 * d11 + d12 * d12 + d13 * d13;
boolean flag1 = false;

View File

@ -1,14 +1,14 @@
From 3c7025b272d89775ff08c4458439f596138931a1 Mon Sep 17 00:00:00 2001
From 86cb7f8a6ee51e5572d775875f6618b855967d50 Mon Sep 17 00:00:00 2001
From: Jonas Konrad <me@yawk.at>
Date: Tue, 22 Jul 2014 15:59:01 +0200
Subject: [PATCH] Make "moved too quickly" limit configurable
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2e5a55d..7f5044d 100644
index a550d80..284c776 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -389,7 +389,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
@@ -393,7 +393,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
// CraftBukkit end
double d17 = d14 * d14 + d15 * d15 + d16 * d16;