From 0fcd0b5c52d8f228d883195cad67ca31a6997e9c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:08:28 -0500 Subject: [PATCH] Make PlayerPickupExperienceEvent extend PlayerEvent --- .../0077-PlayerPickupExperienceEvent.patch | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Spigot-API-Patches/0077-PlayerPickupExperienceEvent.patch b/Spigot-API-Patches/0077-PlayerPickupExperienceEvent.patch index 547760a5f..4276941ac 100644 --- a/Spigot-API-Patches/0077-PlayerPickupExperienceEvent.patch +++ b/Spigot-API-Patches/0077-PlayerPickupExperienceEvent.patch @@ -1,4 +1,4 @@ -From c35ec3d0d0ad4bab56dc760a99a53bdff3c2e4a7 Mon Sep 17 00:00:00 2001 +From d8a66c3b1137626639c052ccb0a1735431f7c576 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 22:00:41 -0500 Subject: [PATCH] PlayerPickupExperienceEvent @@ -7,10 +7,10 @@ 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 +1,83 @@ +@@ -0,0 +1,76 @@ +/* + * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License + * @@ -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() {