From 48473fe0032f1b4866c0d9b84210aaa0dcf9add0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Jun 2020 20:25:28 -0400 Subject: [PATCH] 1.15.2 - Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 149527f7 SPIGOT-5782: Set Arrow Launched From Crossbow CraftBukkit Changes: be6aaf04 SPIGOT-5782: Set Arrow Launched From Crossbow 833da9c4 SPIGOT-5799: InventoryCloseEvent fires after PlayerQuitEvent 26c0084f SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions 7f3e7c3f SPIGOT-5797: Zombie(Villagers) Instant Convert based on their lifetime --- .../Configurable-Player-Collision.patch | 2 +- .../Improved-Watchdog-Support.patch | 4 ++-- .../InventoryCloseEvent-Reason-API.patch | 13 ++++++++----- .../Load-Chunks-for-Login-Asynchronously.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Spigot-Server-Patches/Configurable-Player-Collision.patch b/Spigot-Server-Patches/Configurable-Player-Collision.patch index 67e0dcaeb2..9da00c4f5d 100644 --- a/Spigot-Server-Patches/Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/Configurable-Player-Collision.patch @@ -83,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ()); } @@ -0,0 +0,0 @@ public abstract class PlayerList { - entityplayer.playerTick();// SPIGOT-924 + entityplayer.playerTick(); // SPIGOT-924 // CraftBukkit end + // Paper start - Remove from collideRule team if needed diff --git a/Spigot-Server-Patches/Improved-Watchdog-Support.patch b/Spigot-Server-Patches/Improved-Watchdog-Support.patch index 567c43c331..1486a45c9f 100644 --- a/Spigot-Server-Patches/Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/Improved-Watchdog-Support.patch @@ -279,8 +279,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); -- entityplayer.playerTick();// SPIGOT-924 -+ if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) +- entityplayer.playerTick(); // SPIGOT-924 ++ if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) // CraftBukkit end // Paper start - Remove from collideRule team if needed diff --git a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch index 9588082029..33c16f5258 100644 --- a/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/InventoryCloseEvent-Reason-API.patch @@ -108,8 +108,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 entityplayer.a(StatisticList.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it -- org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer); -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper +- entityplayer.closeInventory(); ++ entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); @@ -176,19 +176,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // Paper start -+ + /** + * Incase plugins hooked into this or Spigot adds a new inventory close event. Prefer to pass a reason + * @param human + */ + @Deprecated public static void handleInventoryCloseEvent(EntityHuman human) { -- InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView()); + handleInventoryCloseEvent(human, org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNKNOWN); + } + public static void handleInventoryCloseEvent(EntityHuman human, org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) { -+ InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView(), reason); + // Paper end + // SPIGOT-5799 - no need to fire for when no inventory open + if (human.activeContainer == human.defaultContainer) { + return; + } +- InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView()); ++ InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView(), reason); // Paper human.world.getServer().getPluginManager().callEvent(event); human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity()); } diff --git a/Spigot-Server-Patches/Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/Load-Chunks-for-Login-Asynchronously.patch index 9c8cfb440e..a113cfd103 100644 --- a/Spigot-Server-Patches/Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/Load-Chunks-for-Login-Asynchronously.patch @@ -221,14 +221,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit @@ -0,0 +0,0 @@ public abstract class PlayerList { - org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper + entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); - cserver.getPluginManager().callEvent(playerQuitEvent); + if (entityplayer.didPlayerJoinEvent) cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); - if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) + if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) @@ -0,0 +0,0 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end diff --git a/work/Bukkit b/work/Bukkit index b2f1908c59..149527f7b1 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit b2f1908c59d22a693ee7ef10f480081436145251 +Subproject commit 149527f7b10f992ef22186e85f13ded96ab76a63 diff --git a/work/CraftBukkit b/work/CraftBukkit index 8ea9b1386b..be6aaf046e 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 8ea9b1386bc7f131c3df3ed0b87b49a5a3e811ba +Subproject commit be6aaf046eed614b0034ec42d5ef5e6f7de16ff0