2018-07-19 06:42:43 +02:00
|
|
|
From 97a35e82ddb729fd74ce6d252a2c928a24b39d55 Mon Sep 17 00:00:00 2001
|
2016-04-03 03:10:38 +02:00
|
|
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
|
|
|
Date: Sat, 2 Apr 2016 05:08:36 -0400
|
|
|
|
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
|
|
|
new file mode 100644
|
2017-04-22 16:32:06 +02:00
|
|
|
index 00000000..70eeaf5c
|
2016-04-03 03:10:38 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
|
|
|
@@ -0,0 +1,42 @@
|
|
|
|
+package com.destroystokyo.paper.event.player;
|
|
|
|
+
|
|
|
|
+import org.bukkit.entity.Player;
|
|
|
|
+import org.bukkit.event.HandlerList;
|
|
|
|
+import org.bukkit.event.player.PlayerEvent;
|
|
|
|
+import org.bukkit.inventory.EquipmentSlot;
|
|
|
|
+
|
|
|
|
+public class PlayerUseUnknownEntityEvent extends PlayerEvent {
|
|
|
|
+
|
|
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
|
|
+ private final int entityId;
|
|
|
|
+ private final boolean attack;
|
|
|
|
+ private final EquipmentSlot hand;
|
|
|
|
+
|
|
|
|
+ public PlayerUseUnknownEntityEvent(Player who, int entityId, boolean attack, EquipmentSlot hand) {
|
|
|
|
+ super(who);
|
|
|
|
+ this.entityId = entityId;
|
|
|
|
+ this.attack = attack;
|
|
|
|
+ this.hand = hand;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public int getEntityId() {
|
|
|
|
+ return this.entityId;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public boolean isAttack() {
|
|
|
|
+ return this.attack;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public EquipmentSlot getHand() {
|
|
|
|
+ return this.hand;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public HandlerList getHandlers() {
|
|
|
|
+ return handlers;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static HandlerList getHandlerList() {
|
|
|
|
+ return handlers;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
--
|
2018-07-19 06:42:43 +02:00
|
|
|
2.18.0
|
2016-04-03 03:10:38 +02:00
|
|
|
|