mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
Fix a bunch of duplicate EntityCombustEvent calls
By: md_5 <git@md-5.net>
This commit is contained in:
parent
ab7419bd7d
commit
d8f2a7e7cc
6 changed files with 7 additions and 7 deletions
|
@ -287,7 +287,7 @@
|
||||||
+ world.getServer().getPluginManager().callEvent(event);
|
+ world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (!event.isCancelled()) {
|
+ if (!event.isCancelled()) {
|
||||||
+ this.setOnFire(event.getDuration());
|
+ this.setOnFire(event.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@
|
||||||
+ EntityCombustByEntityEvent entityCombustEvent = new EntityCombustByEntityEvent(stormBukkitEntity, thisBukkitEntity, 8);
|
+ EntityCombustByEntityEvent entityCombustEvent = new EntityCombustByEntityEvent(stormBukkitEntity, thisBukkitEntity, 8);
|
||||||
+ pluginManager.callEvent(entityCombustEvent);
|
+ pluginManager.callEvent(entityCombustEvent);
|
||||||
+ if (!entityCombustEvent.isCancelled()) {
|
+ if (!entityCombustEvent.isCancelled()) {
|
||||||
+ this.setOnFire(entityCombustEvent.getDuration());
|
+ this.setOnFire(entityCombustEvent.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
||||||
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
||||||
+ if (!combustEvent.isCancelled()) {
|
+ if (!combustEvent.isCancelled()) {
|
||||||
+ entity.setOnFire(combustEvent.getDuration());
|
+ entity.setOnFire(combustEvent.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,7 +234,7 @@
|
||||||
+
|
+
|
||||||
+ if (!combustEvent.isCancelled()) {
|
+ if (!combustEvent.isCancelled()) {
|
||||||
+ flag4 = true;
|
+ flag4 = true;
|
||||||
+ entity.setOnFire(combustEvent.getDuration());
|
+ entity.setOnFire(combustEvent.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@
|
||||||
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
+ org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
|
||||||
+
|
+
|
||||||
+ if (!combustEvent.isCancelled()) {
|
+ if (!combustEvent.isCancelled()) {
|
||||||
+ entity.setOnFire(combustEvent.getDuration());
|
+ entity.setOnFire(combustEvent.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
+ movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event);
|
+ movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (!event.isCancelled()) {
|
+ if (!event.isCancelled()) {
|
||||||
+ movingobjectposition.entity.setOnFire(event.getDuration());
|
+ movingobjectposition.entity.setOnFire(event.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (!event.isCancelled()) {
|
+ if (!event.isCancelled()) {
|
||||||
+ entity.setOnFire(event.getDuration());
|
+ entity.setOnFire(event.getDuration(), false);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue