Fix a bunch of duplicate EntityCombustEvent calls

This commit is contained in:
md_5 2019-01-11 11:41:32 +11:00
parent 438556243d
commit 843cee65f3
6 changed files with 7 additions and 7 deletions

View file

@ -287,7 +287,7 @@
+ world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ this.setOnFire(event.getDuration());
+ this.setOnFire(event.getDuration(), false);
+ }
+ // CraftBukkit end
}
@ -593,7 +593,7 @@
+ EntityCombustByEntityEvent entityCombustEvent = new EntityCombustByEntityEvent(stormBukkitEntity, thisBukkitEntity, 8);
+ pluginManager.callEvent(entityCombustEvent);
+ if (!entityCombustEvent.isCancelled()) {
+ this.setOnFire(entityCombustEvent.getDuration());
+ this.setOnFire(entityCombustEvent.getDuration(), false);
+ }
+ // CraftBukkit end
}

View file

@ -39,7 +39,7 @@
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
+ if (!combustEvent.isCancelled()) {
+ entity.setOnFire(combustEvent.getDuration());
+ entity.setOnFire(combustEvent.getDuration(), false);
+ }
+ // CraftBukkit end
}

View file

@ -234,7 +234,7 @@
+
+ if (!combustEvent.isCancelled()) {
+ flag4 = true;
+ entity.setOnFire(combustEvent.getDuration());
+ entity.setOnFire(combustEvent.getDuration(), false);
+ }
+ // CraftBukkit end
}

View file

@ -215,7 +215,7 @@
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
+
+ if (!combustEvent.isCancelled()) {
+ entity.setOnFire(combustEvent.getDuration());
+ entity.setOnFire(combustEvent.getDuration(), false);
+ }
+ // CraftBukkit end
}

View file

@ -31,7 +31,7 @@
+ movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ movingobjectposition.entity.setOnFire(event.getDuration());
+ movingobjectposition.entity.setOnFire(event.getDuration(), false);
+ }
+ }
+ // CraftBukkit end

View file

@ -73,7 +73,7 @@
+ this.world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ entity.setOnFire(event.getDuration());
+ entity.setOnFire(event.getDuration(), false);
+ }
+ // CraftBukkit end
}