aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch')
-rw-r--r--Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch
new file mode 100644
index 0000000000..8fa59475c2
--- /dev/null
+++ b/Spigot-API-Patches-Unmapped/0032-Add-PlayerUseUnknownEntityEvent.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jedediah Smith <[email protected]>
+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
+index 0000000000000000000000000000000000000000..09cfdf48ead8f03f3497646537292174241b0868
+--- /dev/null
++++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
+@@ -0,0 +1,46 @@
++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;
++import org.jetbrains.annotations.NotNull;
++
++public class PlayerUseUnknownEntityEvent extends PlayerEvent {
++
++ private static final HandlerList handlers = new HandlerList();
++ private final int entityId;
++ private final boolean attack;
++ @NotNull private final EquipmentSlot hand;
++
++ public PlayerUseUnknownEntityEvent(@NotNull Player who, int entityId, boolean attack, @NotNull 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;
++ }
++
++ @NotNull
++ public EquipmentSlot getHand() {
++ return this.hand;
++ }
++
++ @NotNull
++ @Override
++ public HandlerList getHandlers() {
++ return handlers;
++ }
++
++ @NotNull
++ public static HandlerList getHandlerList() {
++ return handlers;
++ }
++}