From 8c473e7fcd226276be249303a49815f11ccd2024 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 7 Dec 2020 23:51:55 -0800 Subject: [PATCH] deprecate IllegalPacketEvent (#4867) --- Spigot-API-Patches/IllegalPacketEvent.patch | 4 ++++ Spigot-Server-Patches/Add-PlayerJumpEvent.patch | 11 +---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Spigot-API-Patches/IllegalPacketEvent.patch b/Spigot-API-Patches/IllegalPacketEvent.patch index 04829fe43b..be437c09ce 100644 --- a/Spigot-API-Patches/IllegalPacketEvent.patch +++ b/Spigot-API-Patches/IllegalPacketEvent.patch @@ -22,6 +22,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + ++/** ++ * @deprecated Not used ++ */ ++@Deprecated +public class IllegalPacketEvent extends PlayerEvent { + @Nullable private final String type; + @Nullable private final String ex; diff --git a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch index 9b7c2491ee..c5bc026c81 100644 --- a/Spigot-Server-Patches/Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerJumpEvent.patch @@ -8,15 +8,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 @@ import org.bukkit.inventory.CraftingInventory; - import org.bukkit.inventory.EquipmentSlot; - import org.bukkit.inventory.InventoryView; - import org.bukkit.util.NumberConversions; -+import com.destroystokyo.paper.event.player.IllegalPacketEvent; // Paper -+import com.destroystokyo.paper.event.player.PlayerJumpEvent; // Paper - import co.aikar.timings.MinecraftTimings; // Paper - // CraftBukkit end - @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { boolean flag = d8 > 0.0D; @@ -40,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + to.setPitch(packetplayinflying.pitch); + } + -+ PlayerJumpEvent event = new PlayerJumpEvent(player, from, to); ++ com.destroystokyo.paper.event.player.PlayerJumpEvent event = new com.destroystokyo.paper.event.player.PlayerJumpEvent(player, from, to); + + if (event.callEvent()) { + this.player.jump();