'can-mine' is now optional for tool restricts

This commit is contained in:
Jules 2023-06-25 23:05:28 +02:00
parent 7767e51534
commit 8d1714f886
2 changed files with 4 additions and 2 deletions

View File

@ -115,8 +115,9 @@ public class RestrictionManager implements MMOCoreManager {
String parentFormat = formatId(config.getString("parent"));
parent = Objects.requireNonNull(map.get(parentFormat), "Could not find parent with ID '" + parentFormat + "'");
}
for (String key : config.getStringList("can-mine"))
mineable.add(MMOCore.plugin.loadManager.loadBlockType(new MMOLineConfig(key)).generateKey());
if (config.contains("can-mine"))
for (String key : config.getStringList("can-mine"))
mineable.add(MMOCore.plugin.loadManager.loadBlockType(new MMOLineConfig(key)).generateKey());
}
/**

View File

@ -39,6 +39,7 @@ public class FishingManager extends SpecificProfessionManager {
MMOCore.plugin.statManager.registerProfession("CRITICAL_FISHING_FAILURE_CHANCE", getLinkedProfession());
}
@NotNull
public FishingDropTable calculateDropTable(@NotNull Player player, @NotNull FishHook hook) {
ConditionInstance conditionEntity = new ConditionInstance(player, hook.getLocation());