Update upstream CB

This commit is contained in:
Zach Brown 2017-05-13 20:37:46 -05:00
parent c480f39ff9
commit 2c33c8b106
4 changed files with 6 additions and 5 deletions

View file

@ -11,12 +11,12 @@ to make books with as much data as they want. Do not use this without
limiting incoming data from packets in some other way.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 78065e134..4e04134c0 100644
index 5d971f07b..6a7d10344 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -0,0 +0,0 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
static final int MAX_PAGES = 50;
static final int MAX_PAGE_LENGTH = 256;
static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes
static final int MAX_TITLE_LENGTH = 32;
+ private static final boolean OVERRIDE_CHECKS = Boolean.getBoolean("disable.book-limits"); // Paper - Add override

View file

@ -6,7 +6,7 @@ Subject: [PATCH] IllegalPacketEvent
Fired for invalid data from players that represents hacking attempts
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 51d27351d..437575003 100644
index 3946ee6e5..4a3b7be2a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory;
@ -62,6 +62,7 @@ index 51d27351d..437575003 100644
this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex));
} catch (Exception exception7) {
- PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
- this.disconnect("Invalid pick item!"); // CraftBukkit
+ IllegalPacketEvent.process(player.getBukkitEntity(), "InvalidPickItem", "Invalid PickItem", exception7); // Paper
}
}

View file

@ -19,7 +19,7 @@ index 58d40f994..acb4469d2 100644
public void reset() {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 437575003..7c2d43ac2 100644
index 4a3b7be2a..d1b27c220 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, ITickable {

@ -1 +1 @@
Subproject commit 2b6c9f40aef19b5366a8ecd6bf2bb9900ce3c684
Subproject commit 6e3cec8bc78269d72ef7ef49ce82a5eadfb9615a