SPIGOT-4647: Properly cancel VehicleDamageEvent

This commit is contained in:
md_5 2019-03-05 16:42:23 +11:00
parent ec17d07def
commit f102d88299
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@
+ this.world.getServer().getPluginManager().callEvent(event); + this.world.getServer().getPluginManager().callEvent(event);
+ +
+ if (event.isCancelled()) { + if (event.isCancelled()) {
+ return true; + return false;
+ } + }
+ // f = event.getDamage(); // TODO Why don't we do this? + // f = event.getDamage(); // TODO Why don't we do this?
+ // CraftBukkit end + // CraftBukkit end

View File

@ -46,7 +46,7 @@
+ this.world.getServer().getPluginManager().callEvent(event); + this.world.getServer().getPluginManager().callEvent(event);
+ +
+ if (event.isCancelled()) { + if (event.isCancelled()) {
+ return true; + return false;
+ } + }
+ +
+ f = (float) event.getDamage(); + f = (float) event.getDamage();