diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/TearArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/TearArtifact.java index d43fed9e..64ed9ac3 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/TearArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/TearArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.util.optional.Prerequisite; import com.willfp.ecoenchants.enchantments.itemtypes.Artifact; import org.bukkit.Particle; import org.jetbrains.annotations.NotNull; @@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull; public class TearArtifact extends Artifact { public TearArtifact() { super( - "tear_artifact", - Prerequisite.MINIMUM_1_16 + "tear_artifact" ); } 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 73cf67e4..dea660af 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 @@ -1,5 +1,6 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; +import com.willfp.eco.core.drops.DropQueue; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.enchantments.util.EnchantChecks; 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 de7965c8..a99f19ce 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 @@ -2,6 +2,7 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; import com.willfp.eco.core.integrations.anticheat.AnticheatManager; import com.willfp.eco.core.integrations.antigrief.AntigriefManager; +import com.willfp.eco.core.scheduling.RunnableTask; import com.willfp.eco.util.VectorUtils; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; @@ -14,7 +15,6 @@ import org.bukkit.block.data.Levelled; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; @@ -75,7 +75,7 @@ public class MagmaWalker extends EcoEnchant { long afterTicks = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "remove-after-ticks"); - BukkitRunnable replace = this.getPlugin().getRunnableFactory().create(bukkitRunnable -> { + RunnableTask replace = this.getPlugin().getRunnableFactory().create(bukkitRunnable -> { if (block.getType().equals(Material.OBSIDIAN) && !player.getWorld().getBlockAt(player.getLocation().add(0, -1, 0)).equals(block)) { block.setType(Material.LAVA); block.removeMetadata("byMagmaWalker", this.getPlugin()); @@ -89,7 +89,7 @@ public class MagmaWalker extends EcoEnchant { block.setType(Material.LAVA); block.removeMetadata("byMagmaWalker", this.getPlugin()); } else { - replace.runTaskTimer(this.getPlugin(), afterTicks, afterTicks); + replace.runTaskTimer(afterTicks, afterTicks); } } }, afterTicks); diff --git a/eco-extensions/alchemy/build.gradle b/eco-extensions/alchemy/build.gradle index 3bc7a3ec..68da73c8 100644 --- a/eco-extensions/alchemy/build.gradle +++ b/eco-extensions/alchemy/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.0' +version '5.0.0' description = 'Alchemy Extension' shadowJar { diff --git a/eco-extensions/alchemy/src/main/java/com/willfp/ecoenchants/alchemy/AlchemyMain.java b/eco-extensions/alchemy/src/main/java/com/willfp/ecoenchants/alchemy/AlchemyMain.java index b547d357..618131d1 100644 --- a/eco-extensions/alchemy/src/main/java/com/willfp/ecoenchants/alchemy/AlchemyMain.java +++ b/eco-extensions/alchemy/src/main/java/com/willfp/ecoenchants/alchemy/AlchemyMain.java @@ -1,7 +1,7 @@ package com.willfp.ecoenchants.alchemy; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; @@ -11,7 +11,7 @@ public class AlchemyMain extends Extension { */ public static final EcoEnchant ALCHEMY = new Alchemy(); - public AlchemyMain(@NotNull final AbstractEcoPlugin plugin) { + public AlchemyMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/biomes/build.gradle b/eco-extensions/biomes/build.gradle index 8a9fe71c..92604536 100644 --- a/eco-extensions/biomes/build.gradle +++ b/eco-extensions/biomes/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.0' +version '5.0.0' description = 'Biomes Extension' shadowJar { diff --git a/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesEnchantment.java b/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesEnchantment.java index b7f97fb7..66b239ee 100644 --- a/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesEnchantment.java +++ b/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesEnchantment.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.biomes; -import com.willfp.eco.util.optional.Prerequisite; +import com.willfp.eco.core.Prerequisite; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; diff --git a/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesMain.java b/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesMain.java index 86468d8e..2449800d 100644 --- a/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesMain.java +++ b/eco-extensions/biomes/src/main/java/com/willfp/ecoenchants/biomes/BiomesMain.java @@ -1,8 +1,7 @@ package com.willfp.ecoenchants.biomes; - -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.biomes.enchants.defensive.Elevation; import com.willfp.ecoenchants.biomes.enchants.defensive.Glacial; import com.willfp.ecoenchants.biomes.enchants.defensive.HeatTreated; @@ -28,7 +27,7 @@ public class BiomesMain extends Extension { public static final EcoEnchant ICELORD = new Icelord(); public static final EcoEnchant RAINFOREST = new Rainforest(); - public BiomesMain(@NotNull final AbstractEcoPlugin plugin) { + public BiomesMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/effects/build.gradle b/eco-extensions/effects/build.gradle index 78e1557f..b5891acc 100644 --- a/eco-extensions/effects/build.gradle +++ b/eco-extensions/effects/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.0' +version '5.0.0' description = 'Effects Extension' shadowJar { diff --git a/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsEnchantment.java b/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsEnchantment.java index ed3e7239..4e55d6d0 100644 --- a/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsEnchantment.java +++ b/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsEnchantment.java @@ -1,8 +1,7 @@ package com.willfp.ecoenchants.effects; - -import com.willfp.eco.util.events.armorequip.ArmorEquipEvent; -import com.willfp.eco.util.optional.Prerequisite; +import com.willfp.eco.core.Prerequisite; +import com.willfp.eco.core.events.ArmorEquipEvent; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.enchantments.util.EnchantChecks; diff --git a/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsMain.java b/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsMain.java index cdb07f25..9c8a5a52 100644 --- a/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsMain.java +++ b/eco-extensions/effects/src/main/java/com/willfp/ecoenchants/effects/EffectsMain.java @@ -1,8 +1,7 @@ package com.willfp.ecoenchants.effects; - -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.effects.enchants.JumpBoost; import com.willfp.ecoenchants.effects.enchants.NightVision; import com.willfp.ecoenchants.effects.enchants.Regeneration; @@ -18,7 +17,7 @@ public class EffectsMain extends Extension { public static final EcoEnchant SPEED = new Speed(); public static final EcoEnchant WATER_BREATHING = new WaterBreathing(); - public EffectsMain(@NotNull final AbstractEcoPlugin plugin) { + public EffectsMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/endershot/build.gradle b/eco-extensions/endershot/build.gradle index 6e6e6ef7..c052b8eb 100644 --- a/eco-extensions/endershot/build.gradle +++ b/eco-extensions/endershot/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.1' +version '5.0.0' description = 'Endershot Extension' shadowJar { diff --git a/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/Endershot.java b/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/Endershot.java index a8356920..54dedc51 100644 --- a/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/Endershot.java +++ b/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/Endershot.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.endershot; -import com.willfp.eco.util.integrations.mcmmo.McmmoManager; +import com.willfp.eco.core.integrations.mcmmo.McmmoManager; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; diff --git a/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/EndershotMain.java b/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/EndershotMain.java index 3ed5f945..94e578a8 100644 --- a/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/EndershotMain.java +++ b/eco-extensions/endershot/src/main/java/com/willfp/ecoenchants/endershot/EndershotMain.java @@ -1,15 +1,14 @@ package com.willfp.ecoenchants.endershot; - -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; public class EndershotMain extends Extension { public static final EcoEnchant ENDERSHOT = new Endershot(); - public EndershotMain(@NotNull final AbstractEcoPlugin plugin) { + public EndershotMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/firewand/build.gradle b/eco-extensions/firewand/build.gradle index 6e067633..177e290f 100644 --- a/eco-extensions/firewand/build.gradle +++ b/eco-extensions/firewand/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.0' +version '5.0.0' description = 'Firewand Extension' shadowJar { diff --git a/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/Firewand.java b/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/Firewand.java index f2fcd6de..3243550a 100644 --- a/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/Firewand.java +++ b/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/Firewand.java @@ -18,7 +18,7 @@ public class Firewand extends Spell { } @Override - public void onUse(@NotNull final Player player, + public boolean onUse(@NotNull final Player player, final int level, @NotNull final PlayerInteractEvent event) { SmallFireball fireball = player.launchProjectile(SmallFireball.class, player.getEyeLocation().getDirection().multiply(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "velocity"))); @@ -28,6 +28,8 @@ public class Firewand extends Spell { fireball.setMetadata("nobreak", this.getPlugin().getMetadataValueFactory().create(true)); } fireball.setShooter(player); + + return true; } @EventHandler(priority = EventPriority.LOW) diff --git a/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/FirewandMain.java b/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/FirewandMain.java index 12b07d0a..25792316 100644 --- a/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/FirewandMain.java +++ b/eco-extensions/firewand/src/main/java/com/willfp/ecoenchants/firewand/FirewandMain.java @@ -1,14 +1,14 @@ package com.willfp.ecoenchants.firewand; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; public class FirewandMain extends Extension { public static final EcoEnchant FIREWAND = new Firewand(); - public FirewandMain(@NotNull final AbstractEcoPlugin plugin) { + public FirewandMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/mmo/build.gradle b/eco-extensions/mmo/build.gradle index e4e757d5..a09a8ddd 100644 --- a/eco-extensions/mmo/build.gradle +++ b/eco-extensions/mmo/build.gradle @@ -1,5 +1,5 @@ group 'com.willfp' -version '4.0.1' +version '5.0.0' description = 'MMO Extension' repositories { diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOMain.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOMain.java index afbb9d0e..c063dabf 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOMain.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOMain.java @@ -1,20 +1,12 @@ package com.willfp.ecoenchants.mmo; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; -import com.willfp.ecoenchants.mmo.enchants.abilities.Discounted; -import com.willfp.ecoenchants.mmo.enchants.abilities.Recover; import com.willfp.ecoenchants.mmo.enchants.mana.Augment; import com.willfp.ecoenchants.mmo.enchants.mana.Drain; -import com.willfp.ecoenchants.mmo.enchants.mana.Elixir; -import com.willfp.ecoenchants.mmo.enchants.mana.Siphon; -import com.willfp.ecoenchants.mmo.enchants.mana.Spirituality; import com.willfp.ecoenchants.mmo.enchants.misc.Strengthening; import com.willfp.ecoenchants.mmo.enchants.stamina.Athletic; -import com.willfp.ecoenchants.mmo.enchants.stamina.Endurance; -import com.willfp.ecoenchants.mmo.enchants.stamina.Fortitude; -import com.willfp.ecoenchants.mmo.enchants.stamina.Motivate; import org.bukkit.Bukkit; import org.jetbrains.annotations.NotNull; @@ -32,7 +24,7 @@ public class MMOMain extends Extension { public static final EcoEnchant ATHLETIC = new Athletic(); public static final EcoEnchant STRENGTHENING = new Strengthening(); - public MMOMain(@NotNull final AbstractEcoPlugin plugin) { + public MMOMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOPrerequisites.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOPrerequisites.java index d24abc6b..934a88c8 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOPrerequisites.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/MMOPrerequisites.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo; -import com.willfp.eco.util.optional.Prerequisite; +import com.willfp.eco.core.Prerequisite; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Augment.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Augment.java index a432e884..58b45105 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Augment.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Augment.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo.enchants.mana; -import com.willfp.eco.util.events.armorequip.ArmorEquipEvent; +import com.willfp.eco.core.events.ArmorEquipEvent; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.mmo.structure.MMOEnchantment; diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Drain.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Drain.java index 90bef687..d4769c23 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Drain.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/mana/Drain.java @@ -12,7 +12,7 @@ public class Drain extends MMOSpell { } @Override - public void onUse(Player player, int level, PlayerInteractEvent event) { + public boolean onUse(Player player, int level, PlayerInteractEvent event) { double radius = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "radius-per-level") * level; double amount = 1 - ((this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "percentage-per-level") / 100) * level); @@ -23,5 +23,7 @@ public class Drain extends MMOSpell { Player victim = (Player) entity; MMOManager.setMana(victim, MMOManager.getMana(player) * amount); }); + + return true; } } diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/misc/Strengthening.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/misc/Strengthening.java index 035017b4..0e46365e 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/misc/Strengthening.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/misc/Strengthening.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo.enchants.misc; -import com.willfp.eco.util.events.armorequip.ArmorEquipEvent; +import com.willfp.eco.core.events.ArmorEquipEvent; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.mmo.structure.MMOEnchantment; diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/stamina/Athletic.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/stamina/Athletic.java index 03ee8644..e45e1279 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/stamina/Athletic.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/enchants/stamina/Athletic.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo.enchants.stamina; -import com.willfp.eco.util.events.armorequip.ArmorEquipEvent; +import com.willfp.eco.core.events.ArmorEquipEvent; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.mmo.structure.MMOEnchantment; diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOIntegration.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOIntegration.java index 08a13d1a..16d3cdd0 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOIntegration.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOIntegration.java @@ -1,7 +1,7 @@ package com.willfp.ecoenchants.mmo.integrations.mmo; -import com.willfp.eco.util.integrations.Integration; +import com.willfp.eco.core.integrations.Integration; import org.bukkit.entity.Player; public interface MMOIntegration extends Integration { diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOManager.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOManager.java index 7a7a07a8..ea778cb6 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOManager.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/integrations/mmo/MMOManager.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.mmo.integrations.mmo; -import org.apache.commons.lang.Validate; import org.bukkit.entity.Player; import java.util.HashSet; @@ -14,7 +13,6 @@ public class MMOManager { } private static MMOIntegration getIntegration() { - Validate.notEmpty(integrations, "There must be an existing mmo integration!"); return integrations.stream().findFirst().get(); } diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOEnchantment.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOEnchantment.java index 9effe1c7..c4540d98 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOEnchantment.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOEnchantment.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo.structure; -import com.willfp.eco.util.optional.Prerequisite; +import com.willfp.eco.core.Prerequisite; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.mmo.MMOPrerequisites; diff --git a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOSpell.java b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOSpell.java index 1bba69f4..d1323d4a 100644 --- a/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOSpell.java +++ b/eco-extensions/mmo/src/main/java/com/willfp/ecoenchants/mmo/structure/MMOSpell.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.mmo.structure; -import com.willfp.eco.util.optional.Prerequisite; +import com.willfp.eco.core.Prerequisite; import com.willfp.ecoenchants.enchantments.itemtypes.Spell; import com.willfp.ecoenchants.mmo.MMOPrerequisites; diff --git a/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/PrecisionMain.java b/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/PrecisionMain.java index 09610e29..3b5f59c6 100644 --- a/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/PrecisionMain.java +++ b/eco-extensions/precision/src/main/java/com/willfp/ecoenchants/precision/PrecisionMain.java @@ -1,14 +1,14 @@ package com.willfp.ecoenchants.precision; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; public class PrecisionMain extends Extension { public static final EcoEnchant PRECISION = new Precision(); - public PrecisionMain(@NotNull final AbstractEcoPlugin plugin) { + public PrecisionMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/Rainbow.java b/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/Rainbow.java index 1fb38000..3ca79c63 100644 --- a/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/Rainbow.java +++ b/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/Rainbow.java @@ -1,6 +1,6 @@ package com.willfp.ecoenchants.rainbow; -import com.willfp.eco.util.drops.DropQueue; +import com.willfp.eco.core.drops.DropQueue; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; diff --git a/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/RainbowMain.java b/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/RainbowMain.java index 3e0fb2b4..6694f4a8 100644 --- a/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/RainbowMain.java +++ b/eco-extensions/rainbow/src/main/java/com/willfp/ecoenchants/rainbow/RainbowMain.java @@ -1,14 +1,14 @@ package com.willfp.ecoenchants.rainbow; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; public class RainbowMain extends Extension { public static final EcoEnchant RAINBOW = new Rainbow(); - public RainbowMain(@NotNull final AbstractEcoPlugin plugin) { + public RainbowMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/sprint-artifacts/src/main/java/com/willfp/ecoenchants/sprintartifacts/SprintArtifactsMain.java b/eco-extensions/sprint-artifacts/src/main/java/com/willfp/ecoenchants/sprintartifacts/SprintArtifactsMain.java index 8863a922..0e55fa46 100644 --- a/eco-extensions/sprint-artifacts/src/main/java/com/willfp/ecoenchants/sprintartifacts/SprintArtifactsMain.java +++ b/eco-extensions/sprint-artifacts/src/main/java/com/willfp/ecoenchants/sprintartifacts/SprintArtifactsMain.java @@ -1,12 +1,12 @@ package com.willfp.ecoenchants.sprintartifacts; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import org.bukkit.Bukkit; import org.jetbrains.annotations.NotNull; public class SprintArtifactsMain extends Extension { - public SprintArtifactsMain(@NotNull final AbstractEcoPlugin plugin) { + public SprintArtifactsMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningEnchantment.java b/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningEnchantment.java index 83688217..04c3d768 100644 --- a/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningEnchantment.java +++ b/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningEnchantment.java @@ -1,7 +1,7 @@ package com.willfp.ecoenchants.summoning; +import com.willfp.eco.core.Prerequisite; import com.willfp.eco.util.NumberUtils; -import com.willfp.eco.util.optional.Prerequisite; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; diff --git a/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningMain.java b/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningMain.java index a1d5cf23..0c9be4a9 100644 --- a/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningMain.java +++ b/eco-extensions/summoning/src/main/java/com/willfp/ecoenchants/summoning/SummoningMain.java @@ -1,7 +1,7 @@ package com.willfp.ecoenchants.summoning; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.summoning.enchants.Crawler; import com.willfp.ecoenchants.summoning.enchants.Firestorm; @@ -17,7 +17,7 @@ public class SummoningMain extends Extension { public static final EcoEnchant GHOUL = new Ghoul(); public static final EcoEnchant CRAWLER = new Crawler(); - public SummoningMain(@NotNull final AbstractEcoPlugin plugin) { + public SummoningMain(@NotNull final EcoPlugin plugin) { super(plugin); } diff --git a/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/Xray.java b/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/Xray.java index 074e43cd..248c539b 100644 --- a/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/Xray.java +++ b/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/Xray.java @@ -31,13 +31,13 @@ public class Xray extends Spell { } @Override - public void onUse(@NotNull final Player player, + public boolean onUse(@NotNull final Player player, final int level, @NotNull final PlayerInteractEvent event) { Block block = event.getClickedBlock(); if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { - return; + return false; } Location location; @@ -99,6 +99,8 @@ public class Xray extends Spell { block1.removeMetadata("xray-uuid", this.getPlugin()); }, ticks); }); + + return true; } @EventHandler diff --git a/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/XrayMain.java b/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/XrayMain.java index a8565424..044e3864 100644 --- a/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/XrayMain.java +++ b/eco-extensions/xray/src/main/java/com/willfp/ecoenchants/xray/XrayMain.java @@ -1,14 +1,14 @@ package com.willfp.ecoenchants.xray; -import com.willfp.eco.util.extensions.Extension; -import com.willfp.eco.util.plugin.AbstractEcoPlugin; +import com.willfp.eco.core.EcoPlugin; +import com.willfp.eco.core.extensions.Extension; import com.willfp.ecoenchants.enchantments.EcoEnchant; import org.jetbrains.annotations.NotNull; public class XrayMain extends Extension { public static final EcoEnchant XRAY = new Xray(); - public XrayMain(@NotNull final AbstractEcoPlugin plugin) { + public XrayMain(@NotNull final EcoPlugin plugin) { super(plugin); }