Yatopia/patches/server/0034-EMC-Add-the-PlayerThrowTridentEvent.patch

34 lines
1.4 KiB
Diff
Raw Normal View History

2020-02-26 20:12:29 +01:00
From 8d4a41a1dccbf27fc900d38d32f983e372f5dd92 Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Fri, 29 Nov 2019 02:48:17 -0600
Subject: [PATCH] EMC Add the PlayerThrowTridentEvent
---
src/main/java/net/minecraft/server/ItemTrident.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/java/net/minecraft/server/ItemTrident.java b/src/main/java/net/minecraft/server/ItemTrident.java
index f571a158..2997c0e9 100644
--- a/src/main/java/net/minecraft/server/ItemTrident.java
+++ b/src/main/java/net/minecraft/server/ItemTrident.java
@@ -1,6 +1,8 @@
package net.minecraft.server;
import com.google.common.collect.Multimap;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.entity.Player;
public class ItemTrident extends Item {
@@ -62,6 +64,7 @@ public class ItemTrident extends Item {
}
return;
}
+ (new com.destroystokyo.paper.event.player.PlayerThrowTridentEvent((Player) entityhuman.getBukkitEntity(), CraftItemStack.asCraftMirror(itemstack), entitythrowntrident.getBukkitEntity())).callEvent(); // Paper
itemstack.damage(1, entityhuman, (entityhuman1) -> {
entityhuman1.broadcastItemBreak(entityliving.getRaisedHand());
--
2.25.1.windows.1