Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
SPIGOT-794: Call EntityPlaceEvent for Minecart placement
Dieser Commit ist enthalten in:
Ursprung
2b2d084ac9
Commit
0afed59271
@ -58,11 +58,16 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -84,7 +118,7 @@
|
||||
@@ -84,7 +118,12 @@
|
||||
entityminecartabstract.setCustomName(itemstack.getName());
|
||||
}
|
||||
|
||||
- world.addEntity(entityminecartabstract);
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityminecartabstract).isCancelled()) {
|
||||
+ return EnumInteractionResult.FAIL;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+ if (!world.addEntity(entityminecartabstract)) return EnumInteractionResult.PASS; // CraftBukkit
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren