Added craftable option
This commit is contained in:
@@ -110,6 +110,12 @@ public abstract class Talisman implements Listener, Watcher {
|
||||
@Getter
|
||||
private EcoShapedRecipe recipe = null;
|
||||
|
||||
/**
|
||||
* If the talisman is craftable.
|
||||
*/
|
||||
@Getter
|
||||
private boolean craftable = true;
|
||||
|
||||
/**
|
||||
* The base64 skull texture.
|
||||
*/
|
||||
@@ -188,6 +194,7 @@ public abstract class Talisman implements Listener, Watcher {
|
||||
List<String> disabledExistingWorldNames = disabledWorldNames.stream().filter(s -> worldNames.contains(s.toLowerCase())).collect(Collectors.toList());
|
||||
disabledWorlds.addAll(Bukkit.getWorlds().stream().filter(world -> disabledExistingWorldNames.contains(world.getName().toLowerCase())).collect(Collectors.toList()));
|
||||
enabled = config.getBool("enabled");
|
||||
craftable = config.getBool(Talismans.OBTAINING_LOCATION + "craftable");
|
||||
|
||||
TalismanUtils.registerPlaceholders(this);
|
||||
|
||||
@@ -206,7 +213,7 @@ public abstract class Talisman implements Listener, Watcher {
|
||||
return new ComplexRecipePart(test -> Objects.equals(talisman, TalismanChecks.getTalismanOnItem(test)), out);
|
||||
});
|
||||
|
||||
if (this.isEnabled()) {
|
||||
if (this.isCraftable()) {
|
||||
EcoShapedRecipe.Builder builder = EcoShapedRecipe.builder(this.getPlugin(), this.getKey().getKey())
|
||||
.setOutput(out);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 25% chance double the strength of applied potion effects.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage with bows.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage to bosses.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage in the end.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Gain 40% more experience.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 10% chance to get xp randomly while mining.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 40% less fall damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 40% less fire damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Nearby players deal 25% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take less damage the lower down you are, up to 40% less.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Heal 40% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage in the nether.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage with tridents.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage to illagers.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 40% less damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Move 25% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 40% more damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 10% chance double the strength of applied potion effects.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage with bows.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage to bosses.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage in the end.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Gain 25% more experience.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 5% chance to get xp randomly while mining.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 75% less fall damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 25% less fire damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Nearby players deal 10% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take less damage the lower down you are, up to 30% less.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Heal 25% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage in the nether.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage with tridents.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage to illagers.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 25% less damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Move 10% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 25% more damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 5% chance double the strength of applied potion effects.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,8 +3,9 @@ description: Deal 10% more damage with bows.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right
|
||||
recipe:
|
||||
- bow
|
||||
- crossbow
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to bosses.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to creepers.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage in the end.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Gain 10% more experience.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: 2% chance to get xp randomly while mining.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 10% less fall damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 10% less fire damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Nearby players deal 5% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take less damage the lower down you are, up to 20% less.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Heal 10% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Become immune to poison damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage in the nether.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage with tridents.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to illagers.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 10% less damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more melee damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to skeletons.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Move 5% faster.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 25% less damage from spiders.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to spiders.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Take 25% less damage from zombies.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
@@ -3,6 +3,7 @@ description: Deal 10% more damage to zombies.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
craftable: true
|
||||
# Recipes are left-right, top-bottom
|
||||
# The first item is the top left, the second is top middle, and so on. The last is bottom right.
|
||||
recipe:
|
||||
|
||||
Reference in New Issue
Block a user