mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
526795bacd
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
19 lines
1.1 KiB
Diff
19 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: u9g <git@u9g.dev>
|
|
Date: Tue, 3 May 2022 20:41:37 -0400
|
|
Subject: [PATCH] Add PlayerStopUsingItemEvent
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index 5de5ca787905d9e0133e5f75280748526c568203..2b7325d3bcea2175ec22a45101f5bbaf29c2231a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -4045,6 +4045,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
|
|
public void releaseUsingItem() {
|
|
if (!this.useItem.isEmpty()) {
|
|
+ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper - Add PlayerStopUsingItemEvent
|
|
this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks());
|
|
if (this.useItem.useOnRelease()) {
|
|
this.updatingUsingItem();
|