SPIGOT-3143: Don't decrease item stack size if VehicleCreateEvent is cancelled
By: BlackHole <black-hole@live.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user