From c97ca2f9c2788200031710deeddf6e2ff3db9d3d Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 28 Dec 2020 15:31:02 +0000 Subject: [PATCH] Improved codestyle (9/?) --- .../eco/core/proxy/v1_15_R1/RepairCost.java | 2 +- .../eco/core/proxy/v1_16_R1/RepairCost.java | 2 +- .../eco/core/proxy/v1_16_R2/RepairCost.java | 2 +- .../eco/core/proxy/v1_16_R3/RepairCost.java | 2 +- .../ecoenchants/config/configs/Rarity.java | 40 +------------ .../artifact/RedstoneArtifact.java | 2 +- .../ecoenchants/curse/BreaklessnessCurse.java | 3 - .../ecoenchants/curse/FragilityCurse.java | 3 - .../ecoenchants/curse/HarmlessnessCurse.java | 3 - .../ecoenchants/curse/HungerCurse.java | 3 - .../ecoenchants/curse/InaccuracyCurse.java | 3 - .../ecoenchants/curse/MisfortuneCurse.java | 3 - .../ecoenchants/curse/PermanenceCurse.java | 3 - .../ecoenchants/normal/Abattoir.java | 3 - .../ecoenchants/normal/Abrasion.java | 3 - .../ecoenchants/normal/Aerial.java | 3 - .../ecoenchants/normal/Aquatic.java | 3 - .../ecoenchants/normal/Arachnid.java | 3 - .../ecoenchants/normal/Arcanic.java | 3 - .../ecoenchants/normal/Atmospheric.java | 3 - .../ecoenchants/normal/Backstab.java | 3 - .../ecoenchants/normal/Beheading.java | 5 +- .../ecoenchants/normal/BlastMining.java | 3 - .../ecoenchants/normal/Bleed.java | 3 - .../ecoenchants/normal/Blind.java | 3 - .../ecoenchants/normal/BlockBreather.java | 3 - .../ecoenchants/normal/BossHunter.java | 3 - .../ecoenchants/normal/Buckshot.java | 3 - .../ecoenchants/normal/Butchering.java | 3 - .../ecoenchants/normal/Cerebral.java | 3 - .../ecoenchants/normal/Chopless.java | 3 - .../ecoenchants/normal/Cleave.java | 3 - .../ecoenchants/normal/Collateral.java | 3 - .../ecoenchants/normal/Conclude.java | 3 - .../ecoenchants/normal/Corrosive.java | 3 - .../ecoenchants/normal/Cranial.java | 3 - .../ecoenchants/normal/Criticals.java | 3 - .../ecoenchants/normal/Cubism.java | 3 - .../ecoenchants/normal/Defender.java | 3 - .../ecoenchants/normal/Deflection.java | 3 - .../ecoenchants/normal/Defusion.java | 3 - .../ecoenchants/normal/Dexterous.java | 3 - .../ecoenchants/normal/Disable.java | 3 - .../ecoenchants/normal/Disappear.java | 3 - .../ecoenchants/normal/Diurnal.java | 3 - .../ecoenchants/normal/Diverse.java | 3 - .../ecoenchants/normal/Drill.java | 3 - .../ecoenchants/normal/Dullness.java | 3 - .../ecoenchants/normal/Dweller.java | 3 - .../ecoenchants/normal/Electroshock.java | 3 - .../ecoenchants/normal/EndInfusion.java | 3 - .../ecoenchants/normal/EnderSlayer.java | 3 - .../ecoenchants/normal/Enderism.java | 3 - .../ecoenchants/normal/Evasion.java | 3 - .../ecoenchants/normal/Extinguishing.java | 3 - .../ecoenchants/normal/Extract.java | 3 - .../ecoenchants/normal/Famine.java | 3 - .../ecoenchants/normal/Farmhand.java | 3 - .../ecoenchants/normal/Fetching.java | 3 - .../ecoenchants/normal/Finality.java | 3 - .../ecoenchants/normal/Finishing.java | 3 - .../ecoenchants/normal/FireAffinity.java | 3 - .../ecoenchants/normal/FirstStrike.java | 3 - .../ecoenchants/normal/Flinch.java | 3 - .../ecoenchants/normal/Freerunner.java | 3 - .../ecoenchants/normal/Frozen.java | 3 - .../enchantments/ecoenchants/normal/Fury.java | 3 - .../ecoenchants/normal/Goliath.java | 3 - .../ecoenchants/normal/Graceful.java | 3 - .../ecoenchants/normal/Grapple.java | 3 - .../ecoenchants/normal/GreenThumb.java | 3 - .../enchantments/ecoenchants/normal/Grit.java | 3 - .../ecoenchants/normal/Hellish.java | 3 - .../enchantments/ecoenchants/normal/Hook.java | 3 - .../ecoenchants/normal/Horde.java | 3 - .../ecoenchants/normal/IceShot.java | 3 - .../ecoenchants/normal/Identify.java | 3 - .../ecoenchants/normal/Ignite.java | 3 - .../ecoenchants/normal/IllusionAspect.java | 3 - .../ecoenchants/normal/Impact.java | 3 - .../ecoenchants/normal/Incandescence.java | 3 - .../ecoenchants/normal/InfernalTouch.java | 3 - .../ecoenchants/normal/Inferno.java | 3 - .../ecoenchants/normal/Infuriate.java | 3 - .../ecoenchants/normal/Insecticide.java | 3 - .../ecoenchants/normal/Instantaneous.java | 3 - .../ecoenchants/normal/Invigoration.java | 3 - .../ecoenchants/normal/Kinetic.java | 3 - .../ecoenchants/normal/Leeching.java | 3 - .../ecoenchants/normal/Lesion.java | 3 - .../ecoenchants/normal/Levitate.java | 3 - .../ecoenchants/normal/LiquidShot.java | 3 - .../ecoenchants/normal/Lumberjack.java | 3 - .../ecoenchants/normal/MagmaWalker.java | 3 - .../ecoenchants/normal/Marking.java | 3 - .../ecoenchants/normal/Marksman.java | 3 - .../ecoenchants/normal/Necrotic.java | 3 - .../ecoenchants/normal/NetherInfusion.java | 3 - .../ecoenchants/normal/Netheric.java | 3 - .../ecoenchants/normal/Nocturnal.java | 3 - .../ecoenchants/normal/Optics.java | 3 - .../ecoenchants/normal/Oxygenate.java | 3 - .../ecoenchants/normal/Pacify.java | 3 - .../ecoenchants/normal/Paladin.java | 3 - .../ecoenchants/normal/Paralyze.java | 3 - .../ecoenchants/normal/Parasitic.java | 3 - .../ecoenchants/normal/Parry.java | 3 - .../ecoenchants/normal/Phantasm.java | 3 - .../ecoenchants/normal/Plasmic.java | 3 - .../ecoenchants/normal/Protector.java | 3 - .../ecoenchants/normal/Proximity.java | 3 - .../ecoenchants/normal/Puncture.java | 3 - .../ecoenchants/normal/Quadrilateralism.java | 3 - .../ecoenchants/normal/Radiance.java | 3 - .../enchantments/ecoenchants/normal/Rage.java | 3 - .../ecoenchants/normal/Rapid.java | 11 ++-- .../enchantments/ecoenchants/normal/Reel.java | 29 ++++++---- .../ecoenchants/normal/Reinforcement.java | 11 ++-- .../ecoenchants/normal/Rejuvenation.java | 22 ++++--- .../ecoenchants/normal/Replenish.java | 19 ++++--- .../ecoenchants/normal/Respirator.java | 13 +++-- .../ecoenchants/normal/Revenant.java | 13 +++-- .../ecoenchants/normal/Sating.java | 27 ++++++--- .../ecoenchants/normal/Serrated.java | 9 +-- .../ecoenchants/normal/Settle.java | 13 +++-- .../ecoenchants/normal/Shockwave.java | 34 ++++++----- .../ecoenchants/normal/ShotAssist.java | 3 - .../ecoenchants/normal/Sickening.java | 3 - .../ecoenchants/normal/Slaughter.java | 3 - .../ecoenchants/normal/Slicing.java | 3 - .../ecoenchants/normal/Spearfishing.java | 3 - .../ecoenchants/normal/Spiked.java | 3 - .../ecoenchants/normal/Splash.java | 3 - .../enchantments/ecoenchants/normal/Stab.java | 3 - .../ecoenchants/normal/Stalwart.java | 3 - .../ecoenchants/normal/Stamina.java | 3 - .../ecoenchants/normal/StoneSwitcher.java | 3 - .../ecoenchants/normal/StrayAspect.java | 3 - .../ecoenchants/normal/Succession.java | 3 - .../ecoenchants/normal/Supercritical.java | 3 - .../ecoenchants/normal/Sycophant.java | 3 - .../ecoenchants/normal/Tectonic.java | 3 - .../ecoenchants/normal/Telekinesis.java | 3 - .../enchantments/ecoenchants/normal/Thor.java | 3 - .../ecoenchants/normal/Thrive.java | 3 - .../ecoenchants/normal/Tornado.java | 3 - .../ecoenchants/normal/Toxic.java | 3 - .../ecoenchants/normal/Transfuse.java | 3 - .../ecoenchants/normal/Tripleshot.java | 3 - .../ecoenchants/normal/VampireAspect.java | 3 - .../enchantments/ecoenchants/normal/Vein.java | 3 - .../ecoenchants/normal/Venom.java | 3 - .../ecoenchants/normal/VoidAffinity.java | 3 - .../ecoenchants/normal/Voltage.java | 3 - .../ecoenchants/normal/WaterAffinity.java | 3 - .../ecoenchants/normal/WaterAspect.java | 3 - .../ecoenchants/normal/Weakening.java | 3 - .../ecoenchants/normal/Wisdom.java | 3 - .../ecoenchants/normal/Wound.java | 3 - .../enchantments/ecoenchants/normal/Zeus.java | 3 - .../ecoenchants/special/Aiming.java | 3 - .../ecoenchants/special/Annihilate.java | 3 - .../ecoenchants/special/Bladed.java | 3 - .../ecoenchants/special/Bolt.java | 3 - .../ecoenchants/special/Carve.java | 3 - .../ecoenchants/special/Confusion.java | 3 - .../ecoenchants/special/Energizing.java | 3 - .../ecoenchants/special/Force.java | 3 - .../ecoenchants/special/Frenzy.java | 5 +- .../ecoenchants/special/Harpoon.java | 3 - .../special/Indestructibility.java | 3 - .../ecoenchants/special/Instability.java | 3 - .../ecoenchants/special/Intellect.java | 3 - .../ecoenchants/special/LifeSteal.java | 3 - .../ecoenchants/special/Pentashot.java | 3 - .../ecoenchants/special/Preservation.java | 3 - .../ecoenchants/special/Razor.java | 12 ++-- .../ecoenchants/special/Repairing.java | 57 +++++++++++++------ .../ecoenchants/special/Soulbound.java | 3 - .../ecoenchants/special/Spring.java | 3 - .../ecoenchants/special/Streamlining.java | 3 - .../ecoenchants/special/Volatile.java | 3 - .../ecoenchants/precision/Precision.java | 3 - 183 files changed, 175 insertions(+), 641 deletions(-) diff --git a/eco-core/core-nms/v1_15_R1/src/main/java/com/willfp/eco/core/proxy/v1_15_R1/RepairCost.java b/eco-core/core-nms/v1_15_R1/src/main/java/com/willfp/eco/core/proxy/v1_15_R1/RepairCost.java index 75109907..d9ba1b6f 100644 --- a/eco-core/core-nms/v1_15_R1/src/main/java/com/willfp/eco/core/proxy/v1_15_R1/RepairCost.java +++ b/eco-core/core-nms/v1_15_R1/src/main/java/com/willfp/eco/core/proxy/v1_15_R1/RepairCost.java @@ -19,4 +19,4 @@ public final class RepairCost implements RepairCostProxy { net.minecraft.server.v1_15_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack); return nmsStack.getRepairCost(); } -} \ No newline at end of file +} diff --git a/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/eco/core/proxy/v1_16_R1/RepairCost.java b/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/eco/core/proxy/v1_16_R1/RepairCost.java index c08d12bb..79907500 100644 --- a/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/eco/core/proxy/v1_16_R1/RepairCost.java +++ b/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/eco/core/proxy/v1_16_R1/RepairCost.java @@ -19,4 +19,4 @@ public final class RepairCost implements RepairCostProxy { net.minecraft.server.v1_16_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack); return nmsStack.getRepairCost(); } -} \ No newline at end of file +} diff --git a/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/eco/core/proxy/v1_16_R2/RepairCost.java b/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/eco/core/proxy/v1_16_R2/RepairCost.java index b0201734..583e43dd 100644 --- a/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/eco/core/proxy/v1_16_R2/RepairCost.java +++ b/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/eco/core/proxy/v1_16_R2/RepairCost.java @@ -19,4 +19,4 @@ public final class RepairCost implements RepairCostProxy { net.minecraft.server.v1_16_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack); return nmsStack.getRepairCost(); } -} \ No newline at end of file +} diff --git a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/eco/core/proxy/v1_16_R3/RepairCost.java b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/eco/core/proxy/v1_16_R3/RepairCost.java index c2df2daf..10bed11e 100644 --- a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/eco/core/proxy/v1_16_R3/RepairCost.java +++ b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/eco/core/proxy/v1_16_R3/RepairCost.java @@ -19,4 +19,4 @@ public final class RepairCost implements RepairCostProxy { net.minecraft.server.v1_16_R3.ItemStack nmsStack = CraftItemStack.asNMSCopy(itemStack); return nmsStack.getRepairCost(); } -} \ No newline at end of file +} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/Rarity.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/Rarity.java index bdc3a044..e1c06a1c 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/Rarity.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/config/configs/Rarity.java @@ -1,9 +1,7 @@ package com.willfp.ecoenchants.config.configs; import com.willfp.eco.util.config.BaseConfig; -import org.jetbrains.annotations.NotNull; -import java.util.List; import java.util.Set; /** @@ -15,42 +13,6 @@ public class Rarity extends BaseConfig { } public Set getRarities() { - return config.getConfigurationSection("rarities").getKeys(false); - } - - public int getInt(@NotNull String path) { - return config.getInt(path); - } - - public int getInt(@NotNull String path, int def) { - return config.getInt(path, def); - } - - public @NotNull List getInts(@NotNull String path) { - return config.getIntegerList(path); - } - - public boolean getBool(@NotNull String path) { - return config.getBoolean(path); - } - - public @NotNull List getBools(@NotNull String path) { - return config.getBooleanList(path); - } - - public @NotNull String getString(@NotNull String path) { - return config.getString(path); - } - - public @NotNull List getStrings(@NotNull String path) { - return config.getStringList(path); - } - - public double getDouble(@NotNull String path) { - return config.getDouble(path); - } - - public @NotNull List getDoubles(@NotNull String path) { - return config.getDoubleList(path); + return this.getConfig().getConfigurationSection("rarities").getKeys(false); } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/RedstoneArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/RedstoneArtifact.java index 9f3a929c..2e8b1661 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/RedstoneArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/RedstoneArtifact.java @@ -19,4 +19,4 @@ public class RedstoneArtifact extends Artifact { public Particle.DustOptions getDustOptions() { return new Particle.DustOptions(Color.RED, 1.0f); } -} \ No newline at end of file +} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/BreaklessnessCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/BreaklessnessCurse.java index 850bfcc5..9548dd70 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/BreaklessnessCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/BreaklessnessCurse.java @@ -15,9 +15,6 @@ public class BreaklessnessCurse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageBlock(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/FragilityCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/FragilityCurse.java index 7fa6f7aa..f3a496e5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/FragilityCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/FragilityCurse.java @@ -16,9 +16,6 @@ public class FragilityCurse extends EcoEnchant { "fragility_curse", EnchantmentType.CURSE ); } - - // START OF LISTENERS - @EventHandler public void onItemDamage(@NotNull final PlayerItemDamageEvent event) { ItemStack item = event.getItem(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HarmlessnessCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HarmlessnessCurse.java index daaf74bf..2521ff04 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HarmlessnessCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HarmlessnessCurse.java @@ -14,9 +14,6 @@ public class HarmlessnessCurse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HungerCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HungerCurse.java index 7fab9aac..1caaef0f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HungerCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/HungerCurse.java @@ -15,9 +15,6 @@ public class HungerCurse extends EcoEnchant { "hunger_curse", EnchantmentType.CURSE ); } - - // START OF LISTENERS - @EventHandler public void onHunger(@NotNull final FoodLevelChangeEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/InaccuracyCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/InaccuracyCurse.java index bf76fb80..597d1d58 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/InaccuracyCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/InaccuracyCurse.java @@ -17,9 +17,6 @@ public class InaccuracyCurse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull final LivingEntity shooter, @NotNull final Arrow arrow, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/MisfortuneCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/MisfortuneCurse.java index d568dab2..cf423826 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/MisfortuneCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/MisfortuneCurse.java @@ -15,9 +15,6 @@ public class MisfortuneCurse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/PermanenceCurse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/PermanenceCurse.java index d78af1b0..d3f354aa 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/PermanenceCurse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/curse/PermanenceCurse.java @@ -9,8 +9,5 @@ public class PermanenceCurse extends EcoEnchant { "permanence_curse", EnchantmentType.CURSE ); } - - // START OF LISTENERS - // Listeners are in anvil listeners } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abattoir.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abattoir.java index 9140f18d..d5cdcef2 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abattoir.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abattoir.java @@ -15,9 +15,6 @@ public class Abattoir extends EcoEnchant { "abattoir", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abrasion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abrasion.java index b3f86ec8..1ab49558 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abrasion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Abrasion.java @@ -21,9 +21,6 @@ public class Abrasion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity uncastVictim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aerial.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aerial.java index 88e1ae50..6693cb1a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aerial.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aerial.java @@ -17,9 +17,6 @@ public class Aerial extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull final LivingEntity shooter, @NotNull final Arrow arrow, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aquatic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aquatic.java index 1b201e18..07691ea0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aquatic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Aquatic.java @@ -16,9 +16,6 @@ public class Aquatic extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arachnid.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arachnid.java index 0acbc4f1..a427d5f1 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arachnid.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arachnid.java @@ -16,9 +16,6 @@ public class Arachnid extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arcanic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arcanic.java index 998c09c4..3c90e0bb 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arcanic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Arcanic.java @@ -13,9 +13,6 @@ public class Arcanic extends EcoEnchant { "arcanic", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Atmospheric.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Atmospheric.java index 0520e232..ed7094d1 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Atmospheric.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Atmospheric.java @@ -16,9 +16,6 @@ public class Atmospheric extends EcoEnchant { "atmospheric", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onTridentLaunch(@NotNull final LivingEntity shooter, @NotNull final Trident trident, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Backstab.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Backstab.java index 5c9176a6..638557a0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Backstab.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Backstab.java @@ -15,9 +15,6 @@ public class Backstab extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java index 6bc6bb35..58eec0c0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java @@ -20,10 +20,7 @@ public class Beheading extends EcoEnchant { super( "beheading", EnchantmentType.NORMAL ); - } - // START OF LISTENERS - - @EventHandler + } @EventHandler public void onDeath(@NotNull final EntityDeathEvent event) { if (event.getEntity().getKiller() == null) { return; diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlastMining.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlastMining.java index e7eacb90..e71c086b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlastMining.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlastMining.java @@ -23,9 +23,6 @@ public class BlastMining extends EcoEnchant { "blast_mining", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Bleed.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Bleed.java index 96da6998..f0910bbd 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Bleed.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Bleed.java @@ -20,9 +20,6 @@ public class Bleed extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Blind.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Blind.java index 5265245c..765ab4f9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Blind.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Blind.java @@ -19,9 +19,6 @@ public class Blind extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlockBreather.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlockBreather.java index bb6677c4..6d7c256a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlockBreather.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BlockBreather.java @@ -14,9 +14,6 @@ public class BlockBreather extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BossHunter.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BossHunter.java index 80454e72..78431fa3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BossHunter.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/BossHunter.java @@ -16,9 +16,6 @@ public class BossHunter extends EcoEnchant { "boss_hunter", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Buckshot.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Buckshot.java index 63d7b743..4bcce0bb 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Buckshot.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Buckshot.java @@ -22,9 +22,6 @@ public class Buckshot extends EcoEnchant { "buckshot", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onBowShoot(@NotNull final LivingEntity shooter, @NotNull final Arrow arrow, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Butchering.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Butchering.java index 60764fc0..05442757 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Butchering.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Butchering.java @@ -15,9 +15,6 @@ public class Butchering extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cerebral.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cerebral.java index dad65561..0fe58864 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cerebral.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cerebral.java @@ -16,9 +16,6 @@ public class Cerebral extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Chopless.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Chopless.java index e7c855ef..2d0f84a6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Chopless.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Chopless.java @@ -14,9 +14,6 @@ public class Chopless extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cleave.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cleave.java index 7d887fb5..04af102a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cleave.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cleave.java @@ -17,9 +17,6 @@ public class Cleave extends EcoEnchant { "cleave", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Collateral.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Collateral.java index c4d40227..4b456406 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Collateral.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Collateral.java @@ -14,9 +14,6 @@ public class Collateral extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull final LivingEntity shooter, @NotNull final Arrow arrow, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Conclude.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Conclude.java index 24865a24..ce7dae31 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Conclude.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Conclude.java @@ -16,9 +16,6 @@ public class Conclude extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Corrosive.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Corrosive.java index 882cd8dc..e4491465 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Corrosive.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Corrosive.java @@ -19,9 +19,6 @@ public class Corrosive extends EcoEnchant { "corrosive", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity uncastVictim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cranial.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cranial.java index cc8e5294..f6f43ee9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cranial.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cranial.java @@ -15,9 +15,6 @@ public class Cranial extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Criticals.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Criticals.java index c47e9b1a..04784a39 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Criticals.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Criticals.java @@ -14,9 +14,6 @@ public class Criticals extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cubism.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cubism.java index 3303d36a..3b66098a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cubism.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Cubism.java @@ -14,9 +14,6 @@ public class Cubism extends EcoEnchant { "cubism", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defender.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defender.java index af7da7cc..50b3f771 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defender.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defender.java @@ -15,9 +15,6 @@ public class Defender extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Deflection.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Deflection.java index 5d7466c6..d4d9e894 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Deflection.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Deflection.java @@ -15,9 +15,6 @@ public class Deflection extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defusion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defusion.java index 837432da..5b0344cd 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defusion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Defusion.java @@ -15,9 +15,6 @@ public class Defusion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dexterous.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dexterous.java index 32a857e0..ce6510ea 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dexterous.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dexterous.java @@ -18,9 +18,6 @@ public class Dexterous extends EcoEnchant { ); } - // START OF LISTENERS - - @EventHandler public void onDextHold(@NotNull final PlayerItemHeldEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disable.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disable.java index 952c6387..87a464ae 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disable.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disable.java @@ -20,9 +20,6 @@ public class Disable extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disappear.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disappear.java index 8bdf6345..71da0f92 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disappear.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Disappear.java @@ -15,9 +15,6 @@ public class Disappear extends EcoEnchant { "disappear", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diurnal.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diurnal.java index 29d9634c..a1836cca 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diurnal.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diurnal.java @@ -14,9 +14,6 @@ public class Diurnal extends EcoEnchant { "diurnal", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diverse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diverse.java index 4c737831..02fcd986 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diverse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Diverse.java @@ -14,9 +14,6 @@ public class Diverse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Drill.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Drill.java index b0e483c1..8bebfa26 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Drill.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Drill.java @@ -21,9 +21,6 @@ public class Drill extends EcoEnchant { "drill", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dullness.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dullness.java index 443e1446..a0ef4547 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dullness.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dullness.java @@ -19,9 +19,6 @@ public class Dullness extends EcoEnchant { "dullness", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dweller.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dweller.java index 430409c9..3bb1dfb0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dweller.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Dweller.java @@ -14,9 +14,6 @@ public class Dweller extends EcoEnchant { "dweller", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Electroshock.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Electroshock.java index 9c5ddf22..e378493a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Electroshock.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Electroshock.java @@ -16,9 +16,6 @@ public class Electroshock extends EcoEnchant { "electroshock", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EndInfusion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EndInfusion.java index f9cc1910..8ab7bc46 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EndInfusion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EndInfusion.java @@ -15,9 +15,6 @@ public class EndInfusion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EnderSlayer.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EnderSlayer.java index b2a895a1..2685b601 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EnderSlayer.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/EnderSlayer.java @@ -16,9 +16,6 @@ public class EnderSlayer extends EcoEnchant { "ender_slayer", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - private static final Set END_MOBS = new ImmutableSet.Builder() .add(EntityType.ENDERMITE) .add(EntityType.ENDERMAN) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Enderism.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Enderism.java index 32bb0655..c9904cdc 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Enderism.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Enderism.java @@ -19,9 +19,6 @@ public class Enderism extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Evasion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Evasion.java index a72d298a..bb95fb06 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Evasion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Evasion.java @@ -14,9 +14,6 @@ public class Evasion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extinguishing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extinguishing.java index c858fca2..ed5252b6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extinguishing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extinguishing.java @@ -13,9 +13,6 @@ public class Extinguishing extends EcoEnchant { "extinguishing", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extract.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extract.java index 9f703728..4cdb6dcc 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extract.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Extract.java @@ -16,9 +16,6 @@ public class Extract extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Famine.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Famine.java index b010d04b..e6437144 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Famine.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Famine.java @@ -20,9 +20,6 @@ public class Famine extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Farmhand.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Farmhand.java index 982f3c93..e973cbee 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Farmhand.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Farmhand.java @@ -24,9 +24,6 @@ public class Farmhand extends EcoEnchant { "farmhand", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onTill(@NotNull final PlayerInteractEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java index bb3debde..fa2d134a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fetching.java @@ -22,9 +22,6 @@ public class Fetching extends EcoEnchant { "fetching", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler(priority = EventPriority.HIGH) public void onWolfKill(@NotNull final EntityDeathByEntityEvent event) { LivingEntity entity = event.getVictim(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finality.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finality.java index 332be1f9..80d284b7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finality.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finality.java @@ -16,9 +16,6 @@ public class Finality extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finishing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finishing.java index 7821eacf..23df4797 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finishing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Finishing.java @@ -15,9 +15,6 @@ public class Finishing extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FireAffinity.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FireAffinity.java index 44cf3ee2..c391a209 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FireAffinity.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FireAffinity.java @@ -14,9 +14,6 @@ public class FireAffinity extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FirstStrike.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FirstStrike.java index 6d7ddda1..660456a9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FirstStrike.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/FirstStrike.java @@ -14,9 +14,6 @@ public class FirstStrike extends EcoEnchant { "first_strike", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Flinch.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Flinch.java index 2754263c..1afedef7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Flinch.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Flinch.java @@ -18,9 +18,6 @@ public class Flinch extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Freerunner.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Freerunner.java index 1a7486a6..c6db7e1b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Freerunner.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Freerunner.java @@ -14,9 +14,6 @@ public class Freerunner extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onFallDamage(@NotNull final LivingEntity faller, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Frozen.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Frozen.java index 2f9da9a4..19c9e8ce 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Frozen.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Frozen.java @@ -19,9 +19,6 @@ public class Frozen extends EcoEnchant { "frozen", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onHurt(@NotNull final EntityDamageByEntityEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fury.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fury.java index bbfb07aa..7cf755ad 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fury.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Fury.java @@ -22,9 +22,6 @@ public class Fury extends EcoEnchant { "fury", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Goliath.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Goliath.java index e00fd0bd..e7779f6f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Goliath.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Goliath.java @@ -15,9 +15,6 @@ public class Goliath extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Graceful.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Graceful.java index b4742c7a..0bde912b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Graceful.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Graceful.java @@ -19,9 +19,6 @@ public class Graceful extends EcoEnchant { "graceful", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onFall(@NotNull final PlayerMoveEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grapple.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grapple.java index 6862a99e..8e0da516 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grapple.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grapple.java @@ -16,9 +16,6 @@ public class Grapple extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/GreenThumb.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/GreenThumb.java index 229a9228..43bb6780 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/GreenThumb.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/GreenThumb.java @@ -19,9 +19,6 @@ public class GreenThumb extends EcoEnchant { "green_thumb", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onInteract(@NotNull final PlayerInteractEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grit.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grit.java index 6b36d01d..12f46b56 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grit.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Grit.java @@ -18,9 +18,6 @@ public class Grit extends EcoEnchant { "grit", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onGritHurt(@NotNull final EntityDamageByEntityEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hellish.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hellish.java index 60a70a86..b02b339b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hellish.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hellish.java @@ -16,9 +16,6 @@ public class Hellish extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hook.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hook.java index 21811ad1..f6209400 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hook.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Hook.java @@ -17,9 +17,6 @@ public class Hook extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Horde.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Horde.java index 85ad2de4..9164aefe 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Horde.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Horde.java @@ -14,9 +14,6 @@ public class Horde extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IceShot.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IceShot.java index 3953ce70..0324ea6e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IceShot.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IceShot.java @@ -18,9 +18,6 @@ public class IceShot extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Identify.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Identify.java index 4aefc2b7..95684921 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Identify.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Identify.java @@ -18,9 +18,6 @@ public class Identify extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Ignite.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Ignite.java index 1da3370f..2134e995 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Ignite.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Ignite.java @@ -19,9 +19,6 @@ public class Ignite extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowHit(@NotNull final LivingEntity uncastShooter, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IllusionAspect.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IllusionAspect.java index 02db8bef..6b1cf045 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IllusionAspect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/IllusionAspect.java @@ -20,9 +20,6 @@ public class IllusionAspect extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Impact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Impact.java index 869106da..cd8deb48 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Impact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Impact.java @@ -16,9 +16,6 @@ public class Impact extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Incandescence.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Incandescence.java index fb5ae737..57533bc0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Incandescence.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Incandescence.java @@ -16,9 +16,6 @@ public class Incandescence extends EcoEnchant { "incandescence", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onIncandescenceHurt(@NotNull final EntityDamageByEntityEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/InfernalTouch.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/InfernalTouch.java index 27c3a389..150a6df1 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/InfernalTouch.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/InfernalTouch.java @@ -65,9 +65,6 @@ public class InfernalTouch extends EcoEnchant { } return toReturn; } - - // START OF LISTENERS - @EventHandler public void infernalTouchBreak(@NotNull final BlockDropItemEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Inferno.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Inferno.java index 508fd15b..22353798 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Inferno.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Inferno.java @@ -15,9 +15,6 @@ public class Inferno extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentLaunch(@NotNull final LivingEntity shooter, @NotNull final Trident trident, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Infuriate.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Infuriate.java index ca8795ac..19979274 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Infuriate.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Infuriate.java @@ -21,9 +21,6 @@ public class Infuriate extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Insecticide.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Insecticide.java index cf20101f..83457511 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Insecticide.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Insecticide.java @@ -16,9 +16,6 @@ public class Insecticide extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Instantaneous.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Instantaneous.java index cf50af3d..90428a43 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Instantaneous.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Instantaneous.java @@ -16,9 +16,6 @@ public class Instantaneous extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageBlock(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Invigoration.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Invigoration.java index db235e2d..54c1cbc4 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Invigoration.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Invigoration.java @@ -16,9 +16,6 @@ public class Invigoration extends EcoEnchant { "invigoration", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onInvigorationHurt(@NotNull final EntityDamageEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Kinetic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Kinetic.java index e0227892..033f3818 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Kinetic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Kinetic.java @@ -14,9 +14,6 @@ public class Kinetic extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Leeching.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Leeching.java index 010dd0a9..87032344 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Leeching.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Leeching.java @@ -15,9 +15,6 @@ public class Leeching extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lesion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lesion.java index 6e1af48b..b0410c9f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lesion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lesion.java @@ -18,9 +18,6 @@ public class Lesion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Levitate.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Levitate.java index a6ab79a2..2f6f3ab1 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Levitate.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Levitate.java @@ -19,9 +19,6 @@ public class Levitate extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/LiquidShot.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/LiquidShot.java index 2eed668f..e0d2a510 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/LiquidShot.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/LiquidShot.java @@ -18,9 +18,6 @@ public class LiquidShot extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lumberjack.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lumberjack.java index 1a5e7f45..b54b7580 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lumberjack.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Lumberjack.java @@ -26,9 +26,6 @@ public class Lumberjack extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/MagmaWalker.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/MagmaWalker.java index 8af687fe..d8f91974 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/MagmaWalker.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/MagmaWalker.java @@ -25,9 +25,6 @@ public class MagmaWalker extends EcoEnchant { "magma_walker", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onLavaWalk(@NotNull final PlayerMoveEvent event) { Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marking.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marking.java index 0dc308ce..ea0f068e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marking.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marking.java @@ -18,9 +18,6 @@ public class Marking extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java index 47acafd8..5172a7a0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java @@ -17,9 +17,6 @@ public class Marksman extends EcoEnchant { "marksman", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onMarksmanShoot(@NotNull final ProjectileLaunchEvent event) { if (event.getEntityType() != EntityType.ARROW) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Necrotic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Necrotic.java index ab08b7d7..7f797a0c 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Necrotic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Necrotic.java @@ -19,9 +19,6 @@ public class Necrotic extends EcoEnchant { "necrotic", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void necroticKill(@NotNull final EntityDeathEvent event) { if (event.getEntity().getKiller() == null) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/NetherInfusion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/NetherInfusion.java index 14dc67f0..5b3e737b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/NetherInfusion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/NetherInfusion.java @@ -15,9 +15,6 @@ public class NetherInfusion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Netheric.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Netheric.java index 5d92d148..106d5718 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Netheric.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Netheric.java @@ -16,9 +16,6 @@ public class Netheric extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Nocturnal.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Nocturnal.java index 6d88085b..0d3818f4 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Nocturnal.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Nocturnal.java @@ -15,9 +15,6 @@ public class Nocturnal extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Optics.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Optics.java index dd617aa1..6a879fb8 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Optics.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Optics.java @@ -16,9 +16,6 @@ public class Optics extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Oxygenate.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Oxygenate.java index 1e803b4c..3a0bc066 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Oxygenate.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Oxygenate.java @@ -16,9 +16,6 @@ public class Oxygenate extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Pacify.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Pacify.java index fafbf9e7..57ffccc7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Pacify.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Pacify.java @@ -16,9 +16,6 @@ public class Pacify extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paladin.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paladin.java index 419bc06c..971b4bb7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paladin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paladin.java @@ -15,9 +15,6 @@ public class Paladin extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paralyze.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paralyze.java index 75107eb7..f711475f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paralyze.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Paralyze.java @@ -18,9 +18,6 @@ public class Paralyze extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull final Player blocker, @NotNull final LivingEntity attacker, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parasitic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parasitic.java index 475c7443..2b6f30ae 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parasitic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parasitic.java @@ -16,9 +16,6 @@ public class Parasitic extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parry.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parry.java index 5abf7d5d..95e5352a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parry.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Parry.java @@ -15,9 +15,6 @@ public class Parry extends EcoEnchant { "parry", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void parryHit(@NotNull final EntityDamageByEntityEvent event) { if (!(event.getEntity() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Phantasm.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Phantasm.java index b1068a74..7e4253cc 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Phantasm.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Phantasm.java @@ -17,9 +17,6 @@ public class Phantasm extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Plasmic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Plasmic.java index 1968dfb6..eca28906 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Plasmic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Plasmic.java @@ -19,9 +19,6 @@ public class Plasmic extends EcoEnchant { "plasmic", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - private static final Material[] ITEMS; static { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Protector.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Protector.java index 4eea997d..ec804d8b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Protector.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Protector.java @@ -13,9 +13,6 @@ public class Protector extends EcoEnchant { "protector", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity uncastVictim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Proximity.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Proximity.java index 74089a31..c966275f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Proximity.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Proximity.java @@ -14,9 +14,6 @@ public class Proximity extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Puncture.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Puncture.java index 17128363..4384c74e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Puncture.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Puncture.java @@ -17,9 +17,6 @@ public class Puncture extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Quadrilateralism.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Quadrilateralism.java index 55fad8f4..5cba7fd4 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Quadrilateralism.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Quadrilateralism.java @@ -16,9 +16,6 @@ public class Quadrilateralism extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Radiance.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Radiance.java index fb405466..0dd34731 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Radiance.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Radiance.java @@ -18,9 +18,6 @@ public class Radiance extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rage.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rage.java index ff90b241..c1782869 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rage.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rage.java @@ -21,9 +21,6 @@ public class Rage extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java index 155eef73..9841544e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java @@ -15,15 +15,16 @@ public class Rapid extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onBowShoot(@NotNull LivingEntity shooter, @NotNull Arrow arrow, int level, @NotNull EntityShootBowEvent event) { + public void onBowShoot(@NotNull final LivingEntity shooter, + @NotNull final Arrow arrow, + final int level, + @NotNull final EntityShootBowEvent event) { double multiplier = 1 - ((this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "percent-faster-per-level") / 100) * level); - if (event.getForce() < multiplier) + if (event.getForce() < multiplier) { return; + } double force = 1 / event.getForce(); event.getProjectile().setVelocity(event.getProjectile().getVelocity().multiply(force)); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reel.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reel.java index 178bd44a..ba5d0602 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reel.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reel.java @@ -11,6 +11,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerFishEvent; import org.bukkit.util.Vector; +import org.jetbrains.annotations.NotNull; public class Reel extends EcoEnchant { public Reel() { @@ -18,27 +19,35 @@ public class Reel extends EcoEnchant { "reel", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler - public void onFish(PlayerFishEvent event) { - if (!event.getState().equals(PlayerFishEvent.State.CAUGHT_ENTITY)) + public void onFish(@NotNull final PlayerFishEvent event) { + if (!event.getState().equals(PlayerFishEvent.State.CAUGHT_ENTITY)) { return; + } - if (!(event.getCaught() instanceof LivingEntity)) + if (!(event.getCaught() instanceof LivingEntity)) { return; + } Player player = event.getPlayer(); LivingEntity victim = (LivingEntity) event.getCaught(); - if (victim.hasMetadata("NPC")) return; + if (victim.hasMetadata("NPC")) { + return; + } - if (!AntigriefManager.canInjure(player, victim)) return; + if (!AntigriefManager.canInjure(player, victim)) { + return; + } - if (!EnchantChecks.mainhand(player, this)) return; - if (this.getDisabledWorlds().contains(player.getWorld())) return; + if (!EnchantChecks.mainhand(player, this)) { + return; + } + + if (this.getDisabledWorlds().contains(player.getWorld())) { + return; + } int level = EnchantChecks.getMainhandLevel(player, this); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reinforcement.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reinforcement.java index ab79154b..3fe36b6a 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reinforcement.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Reinforcement.java @@ -14,12 +14,13 @@ public class Reinforcement extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onDamageWearingArmor(@NotNull LivingEntity victim, int level, @NotNull EntityDamageEvent event) { - if(event.getCause().equals(EntityDamageEvent.DamageCause.FALL)) return; + public void onDamageWearingArmor(@NotNull final LivingEntity victim, + final int level, + @NotNull final EntityDamageEvent event) { + if (event.getCause().equals(EntityDamageEvent.DamageCause.FALL)) { + return; + } double reduction = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "reduction-per-level"); double multiplier = 1 - ((reduction/100) * level); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rejuvenation.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rejuvenation.java index 637309df..ba406da7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rejuvenation.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rejuvenation.java @@ -7,30 +7,34 @@ import com.willfp.ecoenchants.enchantments.util.EnchantChecks; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.EntityRegainHealthEvent; +import org.jetbrains.annotations.NotNull; + public class Rejuvenation extends EcoEnchant { public Rejuvenation() { super( "rejuvenation", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler - public void onRejuvenationHeal(EntityRegainHealthEvent event) { - if (!(event.getEntity() instanceof Player)) + public void onRejuvenationHeal(@NotNull final EntityRegainHealthEvent event) { + if (!(event.getEntity() instanceof Player)) { return; + } - if (!event.getRegainReason().equals(EntityRegainHealthEvent.RegainReason.SATIATED) && !event.getRegainReason().equals(EntityRegainHealthEvent.RegainReason.REGEN)) + if (!event.getRegainReason().equals(EntityRegainHealthEvent.RegainReason.SATIATED) && !event.getRegainReason().equals(EntityRegainHealthEvent.RegainReason.REGEN)) { return; + } Player player = (Player) event.getEntity(); int totalRejuvenationPoints = EnchantChecks.getArmorPoints(player, this, 0); - if(this.getDisabledWorlds().contains(player.getWorld())) return; - - if (totalRejuvenationPoints == 0) + if (this.getDisabledWorlds().contains(player.getWorld())) { return; + } + + if (totalRejuvenationPoints == 0) { + return; + } double amount = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "per-point-multiplier"); amount = amount * totalRejuvenationPoints; diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Replenish.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Replenish.java index 839c3d10..b7f107f6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Replenish.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Replenish.java @@ -16,20 +16,23 @@ public class Replenish extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onBlockBreak(@NotNull Player player, @NotNull Block block, int level, @NotNull BlockBreakEvent event) { + public void onBlockBreak(@NotNull final Player player, + @NotNull final Block block, + final int level, + @NotNull final BlockBreakEvent event) { Material type = block.getType(); - if(!(block.getBlockData() instanceof Ageable)) return; - - if(block.getType().equals(Material.SUGAR_CANE) || block.getType().equals(Material.SWEET_BERRY_BUSH)) + if (!(block.getBlockData() instanceof Ageable)) { return; + } + + if (block.getType().equals(Material.SUGAR_CANE) || block.getType().equals(Material.SWEET_BERRY_BUSH)) { + return; + } Ageable data = (Ageable) block.getBlockData(); - if(data.getAge() != data.getMaximumAge()) { + if (data.getAge() != data.getMaximumAge()) { event.setDropItems(false); event.setExpToDrop(0); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Respirator.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Respirator.java index 3d2a4179..48b0c627 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Respirator.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Respirator.java @@ -14,16 +14,17 @@ public class Respirator extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onDamageWearingArmor(@NotNull LivingEntity victim, int level, @NotNull EntityDamageEvent event) { - if(!event.getCause().equals(EntityDamageEvent.DamageCause.DRAGON_BREATH)) return; + public void onDamageWearingArmor(@NotNull final LivingEntity victim, + final int level, + final @NotNull EntityDamageEvent event) { + if (!event.getCause().equals(EntityDamageEvent.DamageCause.DRAGON_BREATH)) { + return; + } double reduction = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "percent-less-per-level"); - double multiplier = 1 - (reduction/100 * level); + double multiplier = 1 - ((reduction / 100) * level); event.setDamage(event.getDamage() * multiplier); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Revenant.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Revenant.java index e4a51fc4..a214959f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Revenant.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Revenant.java @@ -17,12 +17,15 @@ public class Revenant extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { - if(!(victim instanceof Zombie || victim instanceof Skeleton)) return; + public void onArrowDamage(@NotNull final LivingEntity attacker, + @NotNull final LivingEntity victim, + @NotNull final Arrow arrow, + final int level, + @NotNull final EntityDamageByEntityEvent event) { + if (!(victim instanceof Zombie || victim instanceof Skeleton)) { + return; + } double damage = event.getDamage(); double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sating.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sating.java index 57cf11c4..49507936 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sating.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sating.java @@ -7,30 +7,39 @@ import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.FoodLevelChangeEvent; +import org.jetbrains.annotations.NotNull; + public class Sating extends EcoEnchant { public Sating() { super( "sating", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler - public void onSatingHunger(FoodLevelChangeEvent event) { - if (!(event.getEntity() instanceof Player)) + public void onSatingHunger(@NotNull final FoodLevelChangeEvent event) { + if (!(event.getEntity() instanceof Player)) { return; + } Player player = (Player) event.getEntity(); - if(!EnchantChecks.helmet(player, this)) return; - if(this.getDisabledWorlds().contains(player.getWorld())) return; - if(event.getFoodLevel() > player.getFoodLevel()) return; + if (!EnchantChecks.helmet(player, this)) { + return; + } + + if (this.getDisabledWorlds().contains(player.getWorld())) { + return; + } + + if (event.getFoodLevel() > player.getFoodLevel()) { + return; + } int level = EnchantChecks.getHelmetLevel(player, this); - if(!EnchantmentUtils.passedChance(this, level)) + if (!EnchantmentUtils.passedChance(this, level)) { return; + } event.setCancelled(true); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Serrated.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Serrated.java index 2b369b08..ef3ec479 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Serrated.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Serrated.java @@ -15,11 +15,12 @@ public class Serrated extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onTridentDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Trident trident, int level, @NotNull EntityDamageByEntityEvent event) { + public void onTridentDamage(@NotNull final LivingEntity attacker, + @NotNull final LivingEntity victim, + @NotNull final Trident trident, + final int level, + @NotNull final EntityDamageByEntityEvent event) { double damage = event.getDamage(); double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier"); double bonus = 1 + (multiplier * level); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Settle.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Settle.java index b06e7387..c744f4fb 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Settle.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Settle.java @@ -16,12 +16,15 @@ public class Settle extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { - if(!(victim instanceof Creeper)) return; + public void onArrowDamage(@NotNull final LivingEntity attacker, + @NotNull final LivingEntity victim, + @NotNull final Arrow arrow, + final int level, + @NotNull final EntityDamageByEntityEvent event) { + if (!(victim instanceof Creeper)) { + return; + } double damage = event.getDamage(); double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Shockwave.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Shockwave.java index ad2c181a..1f687cbb 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Shockwave.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Shockwave.java @@ -14,31 +14,39 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.metadata.FixedMetadataValue; +import org.jetbrains.annotations.NotNull; + public class Shockwave extends EcoEnchant { public Shockwave() { super( "shockwave", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler - public void onShoot(ProjectileLaunchEvent event) { - if (!(event.getEntity() instanceof AbstractArrow)) + public void onShoot(@NotNull final ProjectileLaunchEvent event) { + if (!(event.getEntity() instanceof AbstractArrow)) { return; + } + + if (!(event.getEntity().getShooter() instanceof Player)) { + return; + } - if(!(event.getEntity().getShooter() instanceof Player)) return; Player player = (Player) event.getEntity().getShooter(); AbstractArrow entity = (AbstractArrow) event.getEntity(); ItemStack item = player.getInventory().getItemInMainHand(); - if(entity instanceof Trident) { + if (entity instanceof Trident) { item = ProxyUtils.getProxy(TridentStackProxy.class).getTridentStack((Trident) entity); } - if (!EnchantChecks.item(item, this)) return; - if(this.getDisabledWorlds().contains(player.getWorld())) return; + if (!EnchantChecks.item(item, this)) { + return; + } + + if (this.getDisabledWorlds().contains(player.getWorld())) { + return; + } int ticks = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "particle-tick-delay"); @@ -48,7 +56,9 @@ public class Shockwave extends EcoEnchant { final double finalDamage = damage; this.getPlugin().getRunnableFactory().create(runnable -> { - if(entity.isOnGround() || entity.isInBlock() || entity.isDead()) runnable.cancel(); + if (entity.isOnGround() || entity.isInBlock() || entity.isDead()) { + runnable.cancel(); + } entity.getNearbyEntities(1.5, 1.5, 1.5).stream() .filter(entity1 -> entity1 instanceof LivingEntity) .filter(entity1 -> entity1 != player) @@ -56,9 +66,7 @@ public class Shockwave extends EcoEnchant { .forEach((mob -> { ((LivingEntity) mob).damage(finalDamage, player); mob.setMetadata("shockwaved", new FixedMetadataValue(this.getPlugin(), true)); - this.getPlugin().getScheduler().runLater(() -> { - mob.removeMetadata("shockwaved", this.getPlugin()); - }, 10); + this.getPlugin().getScheduler().runLater(() -> mob.removeMetadata("shockwaved", this.getPlugin()), 10); } )); }).runTaskTimer(4, ticks); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/ShotAssist.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/ShotAssist.java index 740906f3..6215944e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/ShotAssist.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/ShotAssist.java @@ -15,9 +15,6 @@ public class ShotAssist extends EcoEnchant { "shot_assist", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onHit(EntityDamageByEntityEvent event) { if (!(event.getDamager() instanceof Arrow)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sickening.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sickening.java index 731a11ae..b0963020 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sickening.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sickening.java @@ -19,9 +19,6 @@ public class Sickening extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { if(!EnchantmentUtils.passedChance(this, level)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slaughter.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slaughter.java index 7d8b64f3..2f62eaa3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slaughter.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slaughter.java @@ -16,9 +16,6 @@ public class Slaughter extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { if(victim instanceof Monster) return; diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slicing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slicing.java index b076b5c8..0b7dcd9b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slicing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Slicing.java @@ -19,9 +19,6 @@ public class Slicing extends EcoEnchant { "slicing", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - private final ArrayList entities = new ArrayList<>(); @EventHandler diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java index a7b45a41..f4da8253 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spearfishing.java @@ -27,9 +27,6 @@ public class Spearfishing extends EcoEnchant { "spearfishing", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onSpearfishingLand(ProjectileHitEvent event) { if (event.getEntityType() != EntityType.TRIDENT) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spiked.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spiked.java index 35f5a7f0..419ce38d 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spiked.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Spiked.java @@ -15,9 +15,6 @@ public class Spiked extends EcoEnchant { "spiked", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onFish(PlayerFishEvent event) { if(!event.getState().equals(PlayerFishEvent.State.CAUGHT_ENTITY)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java index e021f28b..76c9162b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java @@ -24,9 +24,6 @@ public class Splash extends EcoEnchant { "splash", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onSplashLand(ProjectileHitEvent event) { if (event.getEntityType() != EntityType.TRIDENT) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stab.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stab.java index e0208d26..b5907c5b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stab.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stab.java @@ -14,9 +14,6 @@ public class Stab extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { double baseDamage = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "damage-base"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stalwart.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stalwart.java index 6641d158..205062e4 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stalwart.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stalwart.java @@ -17,9 +17,6 @@ public class Stalwart extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull LivingEntity victim, int level, @NotNull EntityDamageEvent event) { if(!EnchantmentUtils.passedChance(this, level)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stamina.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stamina.java index 16608f13..c03dde20 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stamina.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Stamina.java @@ -13,9 +13,6 @@ public class Stamina extends EcoEnchant { "stamina", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onStaminaHunger(FoodLevelChangeEvent event) { if (!(event.getEntity() instanceof Player)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StoneSwitcher.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StoneSwitcher.java index 79a2da24..4cad25fd 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StoneSwitcher.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StoneSwitcher.java @@ -21,9 +21,6 @@ public class StoneSwitcher extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull Player player, @NotNull Block block, int level, @NotNull BlockBreakEvent event) { if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java index 539c84c2..928d75c8 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/StrayAspect.java @@ -20,9 +20,6 @@ public class StrayAspect extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(attacker instanceof Player && ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker) != 1.0f && !this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged")) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Succession.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Succession.java index 6ff2bee5..29a33e4e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Succession.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Succession.java @@ -20,9 +20,6 @@ public class Succession extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull LivingEntity shooter, @NotNull Arrow arrow, int level, @NotNull EntityShootBowEvent event) { int number = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "extra-arrows"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Supercritical.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Supercritical.java index b10261ee..b39ca1dd 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Supercritical.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Supercritical.java @@ -18,9 +18,6 @@ public class Supercritical extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(attacker instanceof Player && ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker) != 1.0f && !this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged")) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sycophant.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sycophant.java index 75ebe6d8..2dc2eee7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sycophant.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Sycophant.java @@ -16,9 +16,6 @@ public class Sycophant extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDeflect(@NotNull Player blocker, @NotNull LivingEntity attacker, int level, @NotNull EntityDamageByEntityEvent event) { double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "health-per-level"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java index 8fcc5a1b..5ee8f3ad 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java @@ -18,9 +18,6 @@ public class Tectonic extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onFallDamage(@NotNull LivingEntity faller, int level, @NotNull EntityDamageEvent event) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java index 698fe83e..930088a0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Telekinesis.java @@ -37,9 +37,6 @@ public class Telekinesis extends EcoEnchant { "telekinesis", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @Override protected void postUpdate() { always = Configs.CONFIG.getBool("drops.force-dropqueue"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thor.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thor.java index a9331f10..4159d2ab 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thor.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thor.java @@ -19,9 +19,6 @@ public class Thor extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if (attacker instanceof Player && ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker) != 1.0f && !this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged")) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thrive.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thrive.java index 98ce7563..5a58f2f6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thrive.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Thrive.java @@ -16,9 +16,6 @@ public class Thrive extends EcoEnchant { "thrive", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onArmorEquip(ArmorEquipEvent event) { final Player player = event.getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java index 0cd2fefd..4bb553e3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java @@ -15,9 +15,6 @@ public class Tornado extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { double baseVelocity = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "velocity-per-level"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Toxic.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Toxic.java index d2e21018..36c09430 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Toxic.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Toxic.java @@ -20,9 +20,6 @@ public class Toxic extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if (attacker instanceof Player && ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker) != 1.0f && !this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged")) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Transfuse.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Transfuse.java index ef628294..5dde651e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Transfuse.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Transfuse.java @@ -23,9 +23,6 @@ public class Transfuse extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull Player player, @NotNull Block block, int level, @NotNull BlockBreakEvent event) { if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tripleshot.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tripleshot.java index 7a0233f7..be9d7f4b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tripleshot.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tripleshot.java @@ -19,9 +19,6 @@ public class Tripleshot extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull LivingEntity shooter, @NotNull Arrow arrow, int level, @NotNull EntityShootBowEvent event) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VampireAspect.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VampireAspect.java index 88ef1254..a4b6f3fe 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VampireAspect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VampireAspect.java @@ -20,9 +20,6 @@ public class VampireAspect extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(attacker instanceof Player && ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker) != 1.0f && !this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "allow-not-fully-charged")) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Vein.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Vein.java index aff50106..d4ce70a2 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Vein.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Vein.java @@ -26,9 +26,6 @@ public class Vein extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull Player player, @NotNull Block block, int level, @NotNull BlockBreakEvent event) { if (block.hasMetadata("block-ignore")) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Venom.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Venom.java index d23351c4..b118c0e0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Venom.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Venom.java @@ -17,9 +17,6 @@ public class Venom extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { if (!EnchantmentUtils.passedChance(this, level)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VoidAffinity.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VoidAffinity.java index e2cc3c0d..a0f6f123 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VoidAffinity.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/VoidAffinity.java @@ -16,9 +16,6 @@ public class VoidAffinity extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Trident trident, int level, @NotNull EntityDamageByEntityEvent event) { if(!attacker.getWorld().getEnvironment().equals(World.Environment.THE_END)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Voltage.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Voltage.java index b46fa932..671e25ac 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Voltage.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Voltage.java @@ -18,9 +18,6 @@ public class Voltage extends EcoEnchant { "voltage", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - private static final Material[] items = { Material.IRON_HELMET, Material.IRON_CHESTPLATE, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAffinity.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAffinity.java index ccb81435..b0ad7a64 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAffinity.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAffinity.java @@ -15,9 +15,6 @@ public class WaterAffinity extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(!attacker.getLocation().getBlock().getType().equals(Material.WATER)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAspect.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAspect.java index 1ace947a..96c427ea 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAspect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/WaterAspect.java @@ -17,9 +17,6 @@ public class WaterAspect extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(!(victim instanceof Blaze || victim instanceof MagmaCube || victim instanceof Enderman)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Weakening.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Weakening.java index 7cc251c2..a8cbb44f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Weakening.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Weakening.java @@ -17,9 +17,6 @@ public class Weakening extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { int ticksPerLevel = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "ticks-per-level"); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wisdom.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wisdom.java index 6ab895d9..150a7055 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wisdom.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wisdom.java @@ -13,9 +13,6 @@ public class Wisdom extends EcoEnchant { "wisdom", EnchantmentType.NORMAL ); } - - // START OF LISTENERS - @EventHandler public void onExpChange(NaturalExpGainEvent event) { Player player = event.getExpChangeEvent().getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wound.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wound.java index 9f07b28e..2c1d2d7b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wound.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Wound.java @@ -18,9 +18,6 @@ public class Wound extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { if (!EnchantmentUtils.passedChance(this, level)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Zeus.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Zeus.java index a4bd4509..4392e858 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Zeus.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Zeus.java @@ -17,9 +17,6 @@ public class Zeus extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, @NotNull Arrow arrow, int level, @NotNull EntityDamageByEntityEvent event) { if (!EnchantmentUtils.passedChance(this, level)) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java index 4d79c002..ae5069df 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java @@ -26,9 +26,6 @@ public class Aiming extends EcoEnchant { "aiming", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void aimingLaunch(@NotNull final ProjectileLaunchEvent event) { if (!(event.getEntity().getShooter() instanceof Player)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Annihilate.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Annihilate.java index 2fca2e8a..e2e3e8f9 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Annihilate.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Annihilate.java @@ -16,9 +16,6 @@ public class Annihilate extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bladed.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bladed.java index 3bca373e..4ad1a095 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bladed.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bladed.java @@ -15,9 +15,6 @@ public class Bladed extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onTridentDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bolt.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bolt.java index a05ce909..61447b60 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bolt.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Bolt.java @@ -19,9 +19,6 @@ public class Bolt extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Carve.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Carve.java index b90c7752..28bf7af1 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Carve.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Carve.java @@ -18,9 +18,6 @@ public class Carve extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Confusion.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Confusion.java index 560a60be..7c8aba84 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Confusion.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Confusion.java @@ -22,9 +22,6 @@ public class Confusion extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity uncastVictim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Energizing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Energizing.java index 5e3dd9c8..5f09c0cd 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Energizing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Energizing.java @@ -16,9 +16,6 @@ public class Energizing extends EcoEnchant { "energizing", EnchantmentType.SPECIAL ); } - // START OF LISTENERS - - @Override public void onBlockBreak(@NotNull final Player player, @NotNull final Block block, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Force.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Force.java index 48687f39..e92ee028 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Force.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Force.java @@ -15,9 +15,6 @@ public class Force extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArrowDamage(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Frenzy.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Frenzy.java index 62675370..e8d4ade6 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Frenzy.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Frenzy.java @@ -16,10 +16,7 @@ public class Frenzy extends EcoEnchant { super( "frenzy", EnchantmentType.SPECIAL ); - } - // START OF LISTENERS - - @EventHandler + } @EventHandler public void onFrenzyKill(@NotNull final EntityDeathEvent event) { if (event.getEntity().getKiller() == null) { return; diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Harpoon.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Harpoon.java index a4e016bd..72fc21ae 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Harpoon.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Harpoon.java @@ -17,9 +17,6 @@ public class Harpoon extends EcoEnchant { "harpoon", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void onFish(@NotNull final PlayerFishEvent event) { if (!event.getState().equals(PlayerFishEvent.State.CAUGHT_ENTITY)) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Indestructibility.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Indestructibility.java index 325071b2..92dc3c27 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Indestructibility.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Indestructibility.java @@ -16,9 +16,6 @@ public class Indestructibility extends EcoEnchant { "indestructibility", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void onItemDamage(@NotNull final PlayerItemDamageEvent event) { ItemStack item = event.getItem(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Instability.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Instability.java index 43fe5126..c112270b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Instability.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Instability.java @@ -18,9 +18,6 @@ public class Instability extends EcoEnchant { "instability", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void onInstabilityLand(@NotNull final ProjectileHitEvent event) { if (event.getEntityType() != EntityType.ARROW) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Intellect.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Intellect.java index 91d9f132..b3f9571e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Intellect.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Intellect.java @@ -15,9 +15,6 @@ public class Intellect extends EcoEnchant { "intellect", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void onExpChange(@NotNull final NaturalExpGainEvent event) { Player player = event.getExpChangeEvent().getPlayer(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/LifeSteal.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/LifeSteal.java index ac646f92..eeb6fa11 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/LifeSteal.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/LifeSteal.java @@ -15,9 +15,6 @@ public class LifeSteal extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull final LivingEntity attacker, @NotNull final LivingEntity victim, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Pentashot.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Pentashot.java index 130a2667..f1fad6c3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Pentashot.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Pentashot.java @@ -19,9 +19,6 @@ public class Pentashot extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onBowShoot(@NotNull final LivingEntity shooter, @NotNull final Arrow arrow, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Preservation.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Preservation.java index d32a95b4..07fe41ad 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Preservation.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Preservation.java @@ -14,9 +14,6 @@ public class Preservation extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull final LivingEntity victim, final int level, diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Razor.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Razor.java index c4f7946d..7a51ad5b 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Razor.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Razor.java @@ -17,15 +17,15 @@ public class Razor extends EcoEnchant { ); } - // START OF LISTENERS - - @Override - public void onMeleeAttack(@NotNull LivingEntity attacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { + public void onMeleeAttack(@NotNull final LivingEntity attacker, + @NotNull final LivingEntity victim, + final int level, + @NotNull final EntityDamageByEntityEvent event) { double perLevelMultiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier"); double baseDamage = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "base-damage"); - double extra = level*perLevelMultiplier + baseDamage; - if(this.getConfig().getBool((EcoEnchants.CONFIG_LOCATION) + "decrease-if-cooldown") && attacker instanceof Player) { + double extra = (level * perLevelMultiplier) + baseDamage; + if (this.getConfig().getBool((EcoEnchants.CONFIG_LOCATION) + "decrease-if-cooldown") && attacker instanceof Player) { extra *= ProxyUtils.getProxy(CooldownProxy.class).getAttackCooldown((Player) attacker); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Repairing.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Repairing.java index b727ee4b..92e1c418 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Repairing.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Repairing.java @@ -15,6 +15,7 @@ import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.Repairable; +import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.HashSet; @@ -31,64 +32,84 @@ public class Repairing extends EcoEnchant implements EcoRunnable { } @EventHandler - public void onItemPickup(EntityPickupItemEvent event) { - if(!(event.getEntity() instanceof Player)) + public void onItemPickup(@NotNull final EntityPickupItemEvent event) { + if (!(event.getEntity() instanceof Player)) { return; + } refreshPlayer((Player) event.getEntity()); } @EventHandler - public void onPlayerJoin(PlayerJoinEvent event) { + public void onPlayerJoin(@NotNull final PlayerJoinEvent event) { refresh(); } @EventHandler - public void onPlayerLeave(PlayerQuitEvent event) { + public void onPlayerLeave(@NotNull final PlayerQuitEvent event) { refresh(); } @EventHandler - public void onInventoryDrop(EntityDropItemEvent event) { - if(!(event.getEntity() instanceof Player)) + public void onInventoryDrop(@NotNull final EntityDropItemEvent event) { + if (!(event.getEntity() instanceof Player)) { return; + } + refreshPlayer((Player) event.getEntity()); } @EventHandler - public void onInventoryClick(InventoryClickEvent event) { - if(!(event.getWhoClicked() instanceof Player)) + public void onInventoryClick(@NotNull final InventoryClickEvent event) { + if (!(event.getWhoClicked() instanceof Player)) { return; + } refreshPlayer((Player) event.getWhoClicked()); } private void refresh() { players.clear(); this.getPlugin().getServer().getOnlinePlayers().forEach(player -> { - if(Arrays.stream(player.getInventory().getContents()).parallel().anyMatch(item -> EnchantChecks.item(item, this))) + if (Arrays.stream(player.getInventory().getContents()).parallel().anyMatch(item -> EnchantChecks.item(item, this))) { players.add(player); + } }); amount = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "multiplier"); } - private void refreshPlayer(Player player) { + private void refreshPlayer(@NotNull final Player player) { players.remove(player); - if(Arrays.stream(player.getInventory().getContents()).parallel().anyMatch(item -> EnchantChecks.item(item, this))) + if (Arrays.stream(player.getInventory().getContents()).parallel().anyMatch(item -> EnchantChecks.item(item, this))) { players.add(player); + } } @Override public void run() { players.forEach((player -> { - if(this.getDisabledWorlds().contains(player.getWorld())) return; - for(ItemStack item : player.getInventory().getContents()) { + if (this.getDisabledWorlds().contains(player.getWorld())) { + return; + } + for (ItemStack item : player.getInventory().getContents()) { int level = EnchantChecks.getItemLevel(item, this); - if(level == 0) continue; + if (level == 0) { + continue; + } - if(!(item.getItemMeta() instanceof Repairable)) continue; + if (!(item.getItemMeta() instanceof Repairable)) { + continue; + } - if(player.getInventory().getItemInMainHand().equals(item)) continue; - if(player.getInventory().getItemInOffHand().equals(item)) continue; - if(player.getItemOnCursor().equals(item)) continue; + if (player.getInventory().getItemInMainHand().equals(item)) { + continue; + } + + if (player.getInventory().getItemInOffHand().equals(item)) { + continue; + } + + if (player.getItemOnCursor().equals(item)) { + continue; + } DurabilityUtils.repairItem(item, amount * level); player.updateInventory(); diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Soulbound.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Soulbound.java index ee1134cf..f706b12f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Soulbound.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Soulbound.java @@ -21,9 +21,6 @@ public class Soulbound extends EcoEnchant { "soulbound", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - private static final HashMap> soulboundItemsMap = new HashMap<>(); public static List getSoulboundItems(Player player) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Spring.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Spring.java index 7af20859..c5743ace 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Spring.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Spring.java @@ -15,9 +15,6 @@ public class Spring extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onDamageWearingArmor(@NotNull LivingEntity victim, int level, @NotNull EntityDamageEvent event) { if (event.getCause() == EntityDamageEvent.DamageCause.FALL) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Streamlining.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Streamlining.java index 75a53bc1..1dd51e53 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Streamlining.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Streamlining.java @@ -14,9 +14,6 @@ public class Streamlining extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onArmorEquip(@NotNull Player player, int level, @NotNull ArmorEquipEvent event) { if(level == 0) { diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Volatile.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Volatile.java index 0fc2c96e..7bafc7a5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Volatile.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Volatile.java @@ -20,9 +20,6 @@ public class Volatile extends EcoEnchant { ); } - // START OF LISTENERS - - @Override public void onMeleeAttack(@NotNull LivingEntity uncastAttacker, @NotNull LivingEntity victim, int level, @NotNull EntityDamageByEntityEvent event) { if(!(uncastAttacker instanceof Player)) return; diff --git a/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/Precision.java b/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/Precision.java index bf6dc9c1..2fe1cea1 100644 --- a/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/Precision.java +++ b/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/Precision.java @@ -29,9 +29,6 @@ public class Precision extends EcoEnchant { "precision", EnchantmentType.SPECIAL ); } - - // START OF LISTENERS - @EventHandler public void aimingLaunch(@NotNull final ProjectileLaunchEvent event) { if (!(event.getEntity().getShooter() instanceof Player)) {