From 337c166b27486d2d8b937b63e21262c1dcec7991 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 19 Feb 2021 20:01:22 +0000 Subject: [PATCH] Reverted constructor change --- .../willfp/talismans/talismans/Talisman.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/Talisman.java b/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/Talisman.java index b33f228..04190a7 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/Talisman.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/talismans/talismans/Talisman.java @@ -30,7 +30,6 @@ import org.bukkit.permissions.PermissionDefault; import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataType; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Arrays; @@ -151,32 +150,11 @@ public abstract class Talisman implements Listener, Watcher { protected Talisman(@NotNull final String key, @NotNull final TalismanStrength strength, @NotNull final Prerequisite... prerequisites) { - this(key, strength, null, prerequisites); - } - - /** - * Create a new Talisman. - * - * @param key The key name of the talisman. - * @param strength The strength of the talisman. - * @param prerequisites Optional {@link Prerequisite}s that must be met. - * @param source Override the source for talismans that exist in the base plugin with custom strengths. - */ - protected Talisman(@NotNull final String key, - @NotNull final TalismanStrength strength, - @Nullable final Class source, - @NotNull final Prerequisite... prerequisites) { this.strength = strength; this.key = this.getPlugin().getNamespacedKeyFactory().create(key + "_" + strength.name().toLowerCase()); this.uuid = UUID.nameUUIDFromBytes(this.getKey().getKey().getBytes()); this.configName = this.key.getKey().replace("_", ""); - - if (source == null) { - TalismansConfigs.addTalismanConfig(new TalismanConfig(this.configName, this.strength, this.getClass())); - } else { - TalismansConfigs.addTalismanConfig(new TalismanConfig(this.configName, this.strength, source)); - } - + TalismansConfigs.addTalismanConfig(new TalismanConfig(this.configName, this.strength, this.getClass())); this.config = TalismansConfigs.getTalismanConfig(this.configName); if (Bukkit.getPluginManager().getPermission("talismans.fromtable." + configName) == null) {