From b3f4972ea6d35f85ab581448fd5d9506066382a5 Mon Sep 17 00:00:00 2001 From: namanONcode Date: Mon, 7 Oct 2024 00:22:59 +0530 Subject: [PATCH 1/2] feat: Implement EntityRemoveFromWorldEvent to enhance entity removal tracking - Added EntityRemoveFromWorldEvent class for monitoring when entities are removed from the world. - Defined a Cause enum for various removal reasons: DEATH, DESPAWN, DROP, ENTER_BLOCK, EXPLODE, HIT, MERGE, OUT_OF_WORLD, PICKUP, PLUGIN, TRANSFORMATION, UNLOAD, OTHER. - Included an inner EntityRemoveEvent class with a trigger method for handling removal actions. - Implemented EntityRemoveListener for event handling. - Created EntityManager to manage entity removal and dispatch events. Related to SPIGOT-10280. --- #FIX-ISSUE-10280.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 #FIX-ISSUE-10280.md diff --git a/#FIX-ISSUE-10280.md b/#FIX-ISSUE-10280.md new file mode 100644 index 000000000000..d610608b74f5 --- /dev/null +++ b/#FIX-ISSUE-10280.md @@ -0,0 +1,30 @@ +SPIGOT-10280: Implement EntityRemoveFromWorldEvent for enhanced entity removal tracking +Pull Request Message Expectations +This PR introduces the EntityRemoveFromWorldEvent class, designed to handle entity removal events within the Bukkit API, providing enhanced tracking and flexibility. + +Summary of Changes: +Added EntityRemoveFromWorldEvent class for monitoring entity removal. +Defined an enum Cause representing various reasons for entity removal, including: +DEATH +DESPAWN +DROP +ENTER_BLOCK +EXPLODE +HIT +MERGE +OUT_OF_WORLD +PICKUP +PLUGIN +TRANSFORMATION +UNLOAD +OTHER +Included an inner EntityRemoveEvent class to handle entity removal actions with a trigger method. +Added an EntityRemoveListener class for event handling. +Implemented an EntityManager class to manage and remove entities, dispatching removal events. +Submitting the Changes +Push your changes to a topic branch in your fork of the repository. +Submit a pull request to the relevant repository in the Spigot organization. +Make sure your pull request meets our code requirements. +If you are fixing a JIRA ticket, be sure to update the ticket with a link to the pull request. +All bug fixes must be accompanied by a JIRA ticket. +Ensure all changes (including in patches) have our Minimal Diff Policy in mind. From db4a0d8e6376322c865b9349cd575c353ed1ed8a Mon Sep 17 00:00:00 2001 From: namanONcode Date: Mon, 7 Oct 2024 00:30:38 +0530 Subject: [PATCH 2/2] feat: Implement EntityRemoveFromWorldEvent to enhance entity removal tracking - Added EntityRemoveFromWorldEvent class for monitoring when entities are removed from the world. - Defined a Cause enum for various removal reasons: DEATH, DESPAWN, DROP, ENTER_BLOCK, EXPLODE, HIT, MERGE, OUT_OF_WORLD, PICKUP, PLUGIN, TRANSFORMATION, UNLOAD, OTHER. - Included an inner EntityRemoveEvent class with a trigger method for handling removal actions. - Implemented EntityRemoveListener for event handling. - Created EntityManager to manage entity removal and dispatch events. Related to SPIGOT-10280. --- work/Bukkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/Bukkit b/work/Bukkit index 1fc1020ad0d9..f7ba41f6e468 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 1fc1020ad0d91a1cf6bfaae6f0441c24be701fbf +Subproject commit f7ba41f6e4684602095693921e9a496c50891a95