diff --git a/eco-core/core-nms/v1_16_R3/build.gradle b/eco-core/core-nms/v1_16_R3/build.gradle deleted file mode 100644 index 5930f17d..00000000 --- a/eco-core/core-nms/v1_16_R3/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -group 'com.willfp' -version rootProject.version - -dependencies { - compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT' -} \ No newline at end of file diff --git a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/EcoCraftEnchantmentManager.java b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/EcoCraftEnchantmentManager.java deleted file mode 100644 index b44e93fe..00000000 --- a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/EcoCraftEnchantmentManager.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.willfp.ecoenchants.proxy.v1_16_R3; - -import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantmentMetadata; -import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantments; -import com.willfp.ecoenchants.proxy.proxies.EcoCraftEnchantmentManagerProxy; -import com.willfp.ecoenchants.proxy.v1_16_R3.enchants.EcoCraftEnchantment; -import net.minecraft.server.v1_16_R3.Enchantment; -import net.minecraft.server.v1_16_R3.IRegistry; -import org.bukkit.NamespacedKey; -import org.bukkit.craftbukkit.v1_16_R3.util.CraftNamespacedKey; - -import java.util.Map; - -public final class EcoCraftEnchantmentManager implements EcoCraftEnchantmentManagerProxy { - @Override - public void registerNewCraftEnchantments() { - Map metadataMap = VanillaEnchantments.getMetadataMap(); - - for (Enchantment enchantment : IRegistry.ENCHANTMENT) { - NamespacedKey key = CraftNamespacedKey.fromMinecraft(IRegistry.ENCHANTMENT.getKey(enchantment)); - VanillaEnchantmentMetadata metadata = metadataMap.get(org.bukkit.enchantments.Enchantment.getByKey(key)); - new EcoCraftEnchantment(enchantment, metadata).register(); - } - } -} diff --git a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/OpenInventory.java b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/OpenInventory.java deleted file mode 100644 index c6549c6b..00000000 --- a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/OpenInventory.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.willfp.ecoenchants.proxy.v1_16_R3; - -import com.willfp.ecoenchants.proxy.proxies.OpenInventoryProxy; -import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; - -public final class OpenInventory implements OpenInventoryProxy { - @Override - public Object getOpenInventory(@NotNull final Player player) { - return ((CraftPlayer) player).getHandle().activeContainer; - } -} diff --git a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java deleted file mode 100644 index 6b5a508e..00000000 --- a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.willfp.ecoenchants.proxy.v1_16_R3.enchants; - -import com.willfp.ecoenchants.enchantments.EcoEnchant; -import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantmentMetadata; -import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils; -import net.minecraft.server.v1_16_R3.Enchantment; -import org.bukkit.craftbukkit.v1_16_R3.enchantments.CraftEnchantment; -import org.jetbrains.annotations.NotNull; - -public class EcoCraftEnchantment extends CraftEnchantment { - private final VanillaEnchantmentMetadata metadata; - - public EcoCraftEnchantment(@NotNull final Enchantment target, - @NotNull final VanillaEnchantmentMetadata metadata) { - super(target); - this.metadata = metadata; - } - - @Override - public int getMaxLevel() { - return metadata.maxLevel() == null ? this.getHandle().getMaxLevel() : metadata.maxLevel(); - } - - @Override - public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) { - if (other instanceof EcoEnchant) { - return other.conflictsWith(this); - } - - return metadata.conflicts() == null ? super.conflictsWith(other) : metadata.conflicts().contains(other.getKey()); - } - - public void register() { - EnchantmentUtils.register(this); - } -} diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/CopperArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/CopperArtifact.java index 389df4b0..ca4e83c8 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/CopperArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/CopperArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.core.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 CopperArtifact extends Artifact { public CopperArtifact() { super( - "copper_artifact", - Prerequisite.HAS_1_17 + "copper_artifact" ); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/GlowArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/GlowArtifact.java index da364b2b..ac682227 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/GlowArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/GlowArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.core.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 GlowArtifact extends Artifact { public GlowArtifact() { super( - "glow_artifact", - Prerequisite.HAS_1_17 + "glow_artifact" ); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SparkArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SparkArtifact.java index c3d67527..824f08c5 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SparkArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SparkArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.core.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 SparkArtifact extends Artifact { public SparkArtifact() { super( - "spark_artifact", - Prerequisite.HAS_1_17 + "spark_artifact" ); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SporeArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SporeArtifact.java index 218c6dff..529e2d2d 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SporeArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/SporeArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.core.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 SporeArtifact extends Artifact { public SporeArtifact() { super( - "spore_artifact", - Prerequisite.HAS_1_17 + "spore_artifact" ); } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/WaxArtifact.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/WaxArtifact.java index 81bc657b..b7f59f83 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/WaxArtifact.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/artifact/WaxArtifact.java @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.artifact; -import com.willfp.eco.core.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 WaxArtifact extends Artifact { public WaxArtifact() { super( - "wax_artifact", - Prerequisite.HAS_1_17 + "wax_artifact" ); } 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 2cfebdd7..27ababe7 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 @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; -import com.willfp.eco.core.Prerequisite; import com.willfp.eco.core.drops.DropQueue; import com.willfp.eco.core.integrations.antigrief.AntigriefManager; import com.willfp.eco.core.tuples.Pair; @@ -52,9 +51,7 @@ public class InfernalTouch extends EcoEnchant { RECIPES.put(furnaceRecipe.getInput().getType(), new Pair<>(furnaceRecipe.getResult().getType(), xp)); } - if (Prerequisite.HAS_1_17.isMet()) { - FORTUNE_MATERIALS.add(Material.COPPER_INGOT); - } + FORTUNE_MATERIALS.add(Material.COPPER_INGOT); } public InfernalTouch() { 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 5033b8e7..d048a144 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 @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; -import com.willfp.eco.core.Prerequisite; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import org.bukkit.Material; @@ -32,12 +31,11 @@ public class Replenish extends EcoEnchant { return; } - if (Prerequisite.HAS_1_17.isMet()) { - if (block.getType() == Material.GLOW_BERRIES) { - return; - } + if (block.getType() == Material.GLOW_BERRIES) { + return; } + if (data.getAge() != data.getMaximumAge()) { event.setDropItems(false); event.setExpToDrop(0); diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 424f68fd..c8d9b114 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: EcoEnchants version: ${projectVersion} main: com.willfp.ecoenchants.EcoEnchantsPlugin -api-version: 1.16 +api-version: 1.17 authors: [ Auxilor ] website: willfp.com load: STARTUP diff --git a/eco-core/core-proxy/build.gradle b/eco-core/core-proxy/build.gradle index 3f90b631..5795f8bc 100644 --- a/eco-core/core-proxy/build.gradle +++ b/eco-core/core-proxy/build.gradle @@ -2,5 +2,5 @@ group 'com.willfp' version rootProject.version dependencies { - compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT' } \ No newline at end of file diff --git a/eco-extensions/build.gradle b/eco-extensions/build.gradle index e18dcfa6..fac46e61 100644 --- a/eco-extensions/build.gradle +++ b/eco-extensions/build.gradle @@ -5,7 +5,7 @@ subprojects { dependencies { compileOnly project(":eco-core:core-plugin") compileOnly project(":eco-core:core-proxy") - compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT' compileOnly 'com.willfp:libreforge:3.3.0' } diff --git a/settings.gradle b/settings.gradle index f6d41df4..9172271e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,7 +3,6 @@ rootProject.name = 'EcoEnchants' // Core include ':eco-core' include ':eco-core:core-nms' -include ':eco-core:core-nms:v1_16_R3' include ':eco-core:core-nms:v1_17_R1' include ':eco-core:core-nms:v1_18_R1' include ':eco-core:core-proxy'