Merge branch 'Auxilor:master' into master

This commit is contained in:
Drăghiciu Nicolae 2022-01-16 12:55:26 +02:00 committed by GitHub
commit d4d9746768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.willfp.ecoenchants.enchantments.custom;
import com.willfp.eco.core.config.interfaces.Config;
import com.willfp.ecoenchants.enchantments.EcoEnchant;
import com.willfp.ecoenchants.enchantments.meta.EnchantmentTarget;
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
import org.jetbrains.annotations.NotNull;
@ -9,6 +10,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
public class CustomEcoEnchant extends EcoEnchant {
/**
@ -35,6 +37,27 @@ public class CustomEcoEnchant extends EcoEnchant {
}
}
@Override
protected void postUpdate() {
for (EnchantmentTarget target : this.getTargets()) {
if (target.getSlot() == null) {
Logger logger = this.getPlugin().getLogger();
logger.warning("");
logger.warning("Problem with target " + target.getName() + "!");
logger.warning("Go to target.yml and specify a slot for enchants to activate on!");
logger.warning("Example:");
logger.warning(target.getName() + ":");
logger.warning(" - slot:hands");
logger.warning(" - material1");
logger.warning(" - material2");
logger.warning("");
logger.warning("Read the wiki to see available slots!");
logger.warning("Custom Enchantment " + this.getKey().getKey() + " will not work until then");
logger.warning("");
}
}
}
/**
* Get the level.
*

View File

@ -1,2 +1,2 @@
version = 8.23.1
version = 8.23.2
plugin-name = EcoEnchants