From 09682702009d1e031d7d6ca7f2332709d4f4fd75 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:08:28 -0500 Subject: [PATCH] Make PlayerPickupExperienceEvent extend PlayerEvent --- .../PlayerPickupExperienceEvent.patch | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Spigot-API-Patches/PlayerPickupExperienceEvent.patch b/Spigot-API-Patches/PlayerPickupExperienceEvent.patch index 363f37a32c..4ec22d72e9 100644 --- a/Spigot-API-Patches/PlayerPickupExperienceEvent.patch +++ b/Spigot-API-Patches/PlayerPickupExperienceEvent.patch @@ -7,7 +7,7 @@ Allows plugins to cancel a player picking up an experience orb diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java new file mode 100644 -index 00000000..0b1b5ae7 +index 00000000..f9ef95cd --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java @@ -0,0 +0,0 @@ @@ -41,27 +41,20 @@ index 00000000..0b1b5ae7 +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; ++import org.bukkit.event.player.PlayerEvent; + +/** + * Fired when a player is attempting to pick up an experience orb + */ -+public class PlayerPickupExperienceEvent extends Event implements Cancellable { -+ private final Player player; ++public class PlayerPickupExperienceEvent extends PlayerEvent implements Cancellable { + private final ExperienceOrb experienceOrb; + + public PlayerPickupExperienceEvent(Player player, ExperienceOrb experienceOrb) { -+ this.player = player; ++ super(player); + this.experienceOrb = experienceOrb; + } + + /** -+ * @return The player picking up an experience orb -+ */ -+ public Player getPlayer() { -+ return player; -+ } -+ -+ /** + * @return Returns the Orb that the player is picking up + */ + public ExperienceOrb getExperienceOrb() {