Updated extensions to use new constructor

This commit is contained in:
Auxilor
2020-12-12 11:43:14 +00:00
parent 7ab1a35686
commit ae3ffd2954
22 changed files with 60 additions and 56 deletions

View File

@@ -13,7 +13,7 @@ import org.bukkit.potion.PotionEffect;
public class Alchemy extends EcoEnchant {
public Alchemy() {
super("alchemy", EnchantmentType.NORMAL, AlchemyMain.class);
super("alchemy", EnchantmentType.NORMAL);
}
private static final FixedMetadataValue TRUE = new FixedMetadataValue(EcoEnchantsPlugin.getInstance(), true);

View File

@@ -1,3 +1,3 @@
name: Alchemy
main: com.willfp.ecoenchants.alchemy.AlchemyMain
version: 1.1.0
version: 2.0.0

View File

@@ -12,7 +12,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
public abstract class BiomesEnchantment extends EcoEnchant {
protected BiomesEnchantment(String key, EnchantmentType type, Prerequisite... prerequisites) {
super(key, type, BiomesMain.class, prerequisites);
super(key, type, prerequisites);
}
public abstract boolean isValid(Biome biome);

View File

@@ -1,3 +1,3 @@
name: Biomes
main: com.willfp.ecoenchants.biomes.BiomesMain
version: 1.1.0
version: 2.0.0

View File

@@ -13,7 +13,7 @@ import org.bukkit.potion.PotionEffectType;
public abstract class EffectsEnchantment extends EcoEnchant {
protected EffectsEnchantment(String key, EnchantmentType type, Prerequisite... prerequisites) {
super(key, type, EffectsMain.class, prerequisites);
super(key, type, prerequisites);
}
public abstract PotionEffectType getPotionEffect();

View File

@@ -1,3 +1,3 @@
name: Effects
main: com.willfp.ecoenchants.effects.EffectsMain
version: 1.1.0
version: 2.0.0

View File

@@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
public class Endershot extends EcoEnchant {
public Endershot() {
super("endershot", EnchantmentType.NORMAL, EndershotMain.class);
super("endershot", EnchantmentType.NORMAL);
}
@EventHandler(priority = EventPriority.LOW)

View File

@@ -1,3 +1,3 @@
name: Endershot
main: com.willfp.ecoenchants.endershot.EndershotMain
version: 1.1.0
version: 2.0.0

View File

@@ -14,7 +14,7 @@ import org.bukkit.metadata.FixedMetadataValue;
public class Firewand extends Spell {
public Firewand() {
super("firewand", FirewandMain.class);
super("firewand");
}
@Override

View File

@@ -1,3 +1,3 @@
name: Firewand
main: com.willfp.ecoenchants.firewand.FirewandMain
version: 1.1.0
version: 2.0.0

View File

@@ -1,13 +1,12 @@
package com.willfp.ecoenchants.mmo.structure;
import com.willfp.ecoenchants.enchantments.EcoEnchant;
import com.willfp.ecoenchants.mmo.MMOMain;
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
import com.willfp.ecoenchants.util.optional.Prerequisite;
public abstract class MMOEnchantment extends EcoEnchant implements MMOEnchant {
protected MMOEnchantment(String key, EnchantmentType type, Prerequisite... prerequisites) {
super(key, type, MMOMain.getInstance(), MMOPrerequisites.append(prerequisites, MMOPrerequisites.HAS_MMOCORE));
super(key, type, MMOPrerequisites.append(prerequisites, MMOPrerequisites.HAS_MMOCORE));
MMOEnchant.REGISTRY.add(this);
}

View File

@@ -1,14 +1,12 @@
package com.willfp.ecoenchants.mmo.structure
;
package com.willfp.ecoenchants.mmo.structure;
import com.willfp.ecoenchants.enchantments.itemtypes.Spell;
import com.willfp.ecoenchants.mmo.MMOMain;
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
import com.willfp.ecoenchants.util.optional.Prerequisite;
public abstract class MMOSpell extends Spell implements MMOEnchant {
protected MMOSpell(String key, Prerequisite... prerequisites) {
super(key, MMOMain.getInstance(), MMOPrerequisites.append(prerequisites, MMOPrerequisites.HAS_MMOCORE));
super(key, MMOPrerequisites.append(prerequisites, MMOPrerequisites.HAS_MMOCORE));
MMOEnchant.REGISTRY.add(this);
}

View File

@@ -1,3 +1,3 @@
name: MMO
main: com.willfp.ecoenchants.mmo.MMOMain
version: 1.1.0
version: 2.0.0

View File

@@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class Precision extends EcoEnchant {
public Precision() {
super(
"precision", EnchantmentType.SPECIAL, PrecisionMain.class
"precision", EnchantmentType.SPECIAL
);
}

View File

@@ -1,3 +1,3 @@
name: Precision
main: com.willfp.ecoenchants.precision.PrecisionMain
version: 1.1.0
version: 2.0.0

View File

@@ -1,3 +1,3 @@
name: Sprint Artifacts
main: com.willfp.ecoenchants.sprintartifacts.SprintArtifactsMain
version: 1.1.0
version: 2.0.0

View File

@@ -28,7 +28,7 @@ public abstract class SummoningEnchantment extends EcoEnchant {
private final SummoningType summoningType;
protected SummoningEnchantment(String key, EnchantmentType type, SummoningType summoningType, Prerequisite... prerequisites) {
super(key, type, SummoningMain.class, prerequisites);
super(key, type, prerequisites);
this.summoningType = summoningType;
}

View File

@@ -1,3 +1,3 @@
name: Summoning
main: com.willfp.ecoenchants.summoning.SummoningMain
version: 1.1.0
version: 2.0.0