From cf05cccd1b8b96bd48474cbf6c8ddae3365d00d0 Mon Sep 17 00:00:00 2001 From: BlackHole Date: Tue, 21 Mar 2017 23:03:20 +0100 Subject: SPIGOT-3143: Don't decrease item stack size if VehicleCreateEvent is cancelled --- nms-patches/DispenserRegistry.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nms-patches/DispenserRegistry.patch') diff --git a/nms-patches/DispenserRegistry.patch b/nms-patches/DispenserRegistry.patch index 134423f6..189f1cf5 100644 --- a/nms-patches/DispenserRegistry.patch +++ b/nms-patches/DispenserRegistry.patch @@ -498,8 +498,9 @@ entityboat.setType(this.c); entityboat.yaw = enumdirection.l(); - world.addEntity(entityboat); +- world.addEntity(entityboat); - itemstack.subtract(1); ++ if (!world.addEntity(entityboat)) itemstack.add(1); // CraftBukkit + // itemstack.subtract(1); // CraftBukkit - handled during event processing return itemstack; } -- cgit v1.2.3