Commits

Miles Holder authored and md_5 committed 6752f1d63ec
SPIGOT-7396: Add PlayerSignOpenEvent
No tags

nms-patches/net/minecraft/world/item/ItemStack.patch

Modified
235 235 + BlockWitherSkull.checkSpawn(world, bp, (TileEntitySkull) te);
236 236 + }
237 237 + }
238 238 + }
239 239 +
240 240 + // SPIGOT-4678
241 241 + if (this.item instanceof ItemSign && ItemSign.openSign != null) {
242 242 + try {
243 243 + if (world.getBlockEntity(ItemSign.openSign) instanceof TileEntitySign tileentitysign) {
244 244 + if (world.getBlockState(ItemSign.openSign).getBlock() instanceof BlockSign blocksign) {
245 -+ blocksign.openTextEdit(entityhuman, tileentitysign, true);
245 ++ blocksign.openTextEdit(entityhuman, tileentitysign, true, org.bukkit.event.player.PlayerSignOpenEvent.Cause.PLACE); // Craftbukkit
246 246 + }
247 247 + }
248 248 + } finally {
249 249 + ItemSign.openSign = null;
250 250 + }
251 251 + }
252 252 +
253 253 + // SPIGOT-7315: Moved from BlockBed#setPlacedBy
254 254 + if (placeEvent != null && this.item instanceof ItemBed) {
255 255 + BlockPosition position = ((CraftBlock) placeEvent.getBlock()).getPosition();

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut