@@ -45,7 +45,7 @@
|
||||
+
|
||||
+ public CraftEntity getBukkitEntity() {
|
||||
+ if (bukkitEntity == null) {
|
||||
+ bukkitEntity = CraftEntity.getEntity(level.getServer(), this);
|
||||
+ bukkitEntity = CraftEntity.getEntity(level.getCraftServer(), this);
|
||||
+ }
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
@@ -89,7 +89,7 @@
|
||||
+ if (entitypose == this.getPose()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ this.level.getServer().getPluginManager().callEvent(new EntityPoseChangeEvent(this.getBukkitEntity(), Pose.values()[entitypose.ordinal()]));
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(new EntityPoseChangeEvent(this.getBukkitEntity(), Pose.values()[entitypose.ordinal()]));
|
||||
+ // CraftBukkit end
|
||||
this.entityData.set(Entity.DATA_POSE, entitypose);
|
||||
}
|
||||
@@ -105,7 +105,7 @@
|
||||
+
|
||||
+ if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
|
||||
+ if (this instanceof EntityPlayer) {
|
||||
+ this.level.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
|
||||
+ this.level.getCraftServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid yaw");
|
||||
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite yaw (Hacking?)");
|
||||
+ }
|
||||
+ f = 0;
|
||||
@@ -118,7 +118,7 @@
|
||||
+
|
||||
+ if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
|
||||
+ if (this instanceof EntityPlayer) {
|
||||
+ this.level.getServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
|
||||
+ this.level.getCraftServer().getLogger().warning(this.getName() + " was caught trying to crash the server with an invalid pitch");
|
||||
+ ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite pitch (Hacking?)");
|
||||
+ }
|
||||
+ f1 = 0;
|
||||
@@ -165,7 +165,7 @@
|
||||
+ org.bukkit.block.Block damager = null; // ((WorldServer) this.l).getWorld().getBlockAt(i, j, k);
|
||||
+ org.bukkit.entity.Entity damagee = this.getBukkitEntity();
|
||||
+ EntityCombustEvent combustEvent = new org.bukkit.event.entity.EntityCombustByBlockEvent(damager, damagee, 15);
|
||||
+ this.level.getServer().getPluginManager().callEvent(combustEvent);
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(combustEvent);
|
||||
+
|
||||
+ if (!combustEvent.isCancelled()) {
|
||||
+ this.setOnFire(combustEvent.getDuration(), false);
|
||||
@@ -189,7 +189,7 @@
|
||||
+ public void setOnFire(int i, boolean callEvent) {
|
||||
+ if (callEvent) {
|
||||
+ EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), i);
|
||||
+ this.level.getServer().getPluginManager().callEvent(event);
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
@@ -222,7 +222,7 @@
|
||||
+
|
||||
+ if (!bl.getType().isAir()) {
|
||||
+ VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
|
||||
+ level.getServer().getPluginManager().callEvent(event);
|
||||
+ level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user