13
0
geforkt von Mirrors/Paper

Make PlayerPickupExperienceEvent extend PlayerEvent

Dieser Commit ist enthalten in:
Aikar 2017-12-19 22:08:28 -05:00
Ursprung ac0ae12415
Commit 0968270200

Datei anzeigen

@ -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() {