aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch')
-rw-r--r--Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch
new file mode 100644
index 0000000000..5dc11c88f8
--- /dev/null
+++ b/Spigot-API-Patches-Unmapped/0028-Entity-AddTo-RemoveFrom-World-Events.patch
@@ -0,0 +1,79 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Mon, 28 Mar 2016 20:26:34 -0400
+Subject: [PATCH] Entity AddTo/RemoveFrom World Events
+
+
+diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java
+new file mode 100644
+index 0000000000000000000000000000000000000000..07660202e41ee86f1b66bad3335cf6fe126e7f9c
+--- /dev/null
++++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java
+@@ -0,0 +1,32 @@
++package com.destroystokyo.paper.event.entity;
++
++import org.bukkit.entity.Entity;
++import org.bukkit.event.Event;
++import org.bukkit.event.HandlerList;
++import org.bukkit.event.entity.EntityEvent;
++import org.jetbrains.annotations.NotNull;
++
++/**
++ * Fired any time an entity is being added to the world for any reason.
++ *
++ * Not to be confused with {@link org.bukkit.event.entity.CreatureSpawnEvent}
++ * This will fire anytime a chunk is reloaded too.
++ */
++public class EntityAddToWorldEvent extends EntityEvent {
++
++ public EntityAddToWorldEvent(@NotNull Entity entity) {
++ super(entity);
++ }
++
++ private static final HandlerList handlers = new HandlerList();
++
++ @NotNull
++ public HandlerList getHandlers() {
++ return handlers;
++ }
++
++ @NotNull
++ public static HandlerList getHandlerList() {
++ return handlers;
++ }
++}
+diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java
+new file mode 100644
+index 0000000000000000000000000000000000000000..e5dbbd660409bae0d3b96e83390511d3a423a52e
+--- /dev/null
++++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java
+@@ -0,0 +1,29 @@
++package com.destroystokyo.paper.event.entity;
++
++import org.bukkit.entity.Entity;
++import org.bukkit.event.Event;
++import org.bukkit.event.HandlerList;
++import org.bukkit.event.entity.EntityEvent;
++import org.jetbrains.annotations.NotNull;
++
++/**
++ * Fired any time an entity is being removed from a world for any reason
++ */
++public class EntityRemoveFromWorldEvent extends EntityEvent {
++
++ public EntityRemoveFromWorldEvent(@NotNull Entity entity) {
++ super(entity);
++ }
++
++ private static final HandlerList handlers = new HandlerList();
++
++ @NotNull
++ public HandlerList getHandlers() {
++ return handlers;
++ }
++
++ @NotNull
++ public static HandlerList getHandlerList() {
++ return handlers;
++ }
++}