From f46ccd7637430f00b4fa7c742a859e3d4b6a5f03 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 22 Nov 2017 17:05:59 +1100 Subject: Fix some formatting in CraftEventFactory --- .../craftbukkit/event/CraftEventFactory.java | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index a8c09481..c4bc628b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -349,14 +349,14 @@ public class CraftEventFactory { return event; } - public static LingeringPotionSplashEvent callLingeringPotionSplashEvent(EntityPotion potion, EntityAreaEffectCloud cloud) { + public static LingeringPotionSplashEvent callLingeringPotionSplashEvent(EntityPotion potion, EntityAreaEffectCloud cloud) { ThrownPotion thrownPotion = (ThrownPotion) potion.getBukkitEntity(); AreaEffectCloud effectCloud = (AreaEffectCloud) cloud.getBukkitEntity(); LingeringPotionSplashEvent event = new LingeringPotionSplashEvent(thrownPotion, effectCloud); Bukkit.getPluginManager().callEvent(event); return event; - } + } /** * BlockFadeEvent @@ -589,7 +589,7 @@ public class CraftEventFactory { private static final Function ZERO = Functions.constant(-0.0); public static EntityDamageEvent handleLivingEntityDamageEvent(Entity damagee, DamageSource source, double rawDamage, double hardHatModifier, double blockingModifier, double armorModifier, double resistanceModifier, double magicModifier, double absorptionModifier, Function hardHat, Function blocking, Function armor, Function resistance, Function magic, Function absorption) { - Map modifiers = new EnumMap(DamageModifier.class); + Map modifiers = new EnumMap(DamageModifier.class); Map> modifierFunctions = new EnumMap>(DamageModifier.class); modifiers.put(DamageModifier.BASE, rawDamage); modifierFunctions.put(DamageModifier.BASE, ZERO); @@ -668,7 +668,7 @@ public class CraftEventFactory { if (!event.isCancelled()) { state.update(true); } - + return !event.isCancelled(); } @@ -856,18 +856,18 @@ public class CraftEventFactory { org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity(); IgniteCause cause; switch (bukkitIgniter.getType()) { - case ENDER_CRYSTAL: - cause = IgniteCause.ENDER_CRYSTAL; - break; - case LIGHTNING: - cause = IgniteCause.LIGHTNING; - break; - case SMALL_FIREBALL: - case FIREBALL: - cause = IgniteCause.FIREBALL; - break; - default: - cause = IgniteCause.FLINT_AND_STEEL; + case ENDER_CRYSTAL: + cause = IgniteCause.ENDER_CRYSTAL; + break; + case LIGHTNING: + cause = IgniteCause.LIGHTNING; + break; + case SMALL_FIREBALL: + case FIREBALL: + cause = IgniteCause.FIREBALL; + break; + default: + cause = IgniteCause.FLINT_AND_STEEL; } BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter); @@ -1037,7 +1037,7 @@ public class CraftEventFactory { } public static EntityBreedEvent callEntityBreedEvent(EntityLiving child, EntityLiving mother, EntityLiving father, EntityLiving breeder, ItemStack bredWith, int experience) { - org.bukkit.entity.LivingEntity breederEntity = (LivingEntity)(breeder == null ? null : breeder.getBukkitEntity()); + org.bukkit.entity.LivingEntity breederEntity = (LivingEntity) (breeder == null ? null : breeder.getBukkitEntity()); CraftItemStack bredWithStack = bredWith == null ? null : CraftItemStack.asCraftMirror(bredWith).clone(); EntityBreedEvent event = new EntityBreedEvent((LivingEntity) child.getBukkitEntity(), (LivingEntity) mother.getBukkitEntity(), (LivingEntity) father.getBukkitEntity(), breederEntity, bredWithStack, experience); -- cgit v1.2.3