Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-4369: Handle cancelled trident event
Dieser Commit ist enthalten in:
Ursprung
bf1c82731c
Commit
97315374fb
@ -14,7 +14,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
public boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||||
@@ -53,6 +57,10 @@
|
@@ -42,7 +46,15 @@
|
||||||
|
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
|
||||||
|
}
|
||||||
|
|
||||||
|
- world.addEntity(entitythrowntrident);
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ if (!world.addEntity(entitythrowntrident)) {
|
||||||
|
+ if (entityhuman instanceof EntityPlayer) {
|
||||||
|
+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
|
||||||
|
+ }
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
+
|
||||||
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
|
entityhuman.inventory.f(itemstack);
|
||||||
|
}
|
||||||
|
@@ -53,6 +65,10 @@
|
||||||
SoundEffect soundeffect = SoundEffects.ITEM_TRIDENT_THROW;
|
SoundEffect soundeffect = SoundEffects.ITEM_TRIDENT_THROW;
|
||||||
|
|
||||||
if (k > 0) {
|
if (k > 0) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren