Debug logs to prevent server crash

This commit is contained in:
Indyuce 2022-08-18 23:38:13 +02:00
parent 57e7e52f84
commit 7f670df8c5
2 changed files with 9 additions and 5 deletions

View File

@ -3,12 +3,12 @@ package net.Indyuce.mmocore.manager;
import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.skill.handler.SkillHandler; import io.lumine.mythic.lib.skill.handler.SkillHandler;
import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.ConfigFile;
import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.skill.RegisteredSkill; import net.Indyuce.mmocore.skill.RegisteredSkill;
import net.Indyuce.mmocore.skill.list.Sneaky_Picky;
import net.Indyuce.mmocore.api.ConfigFile;
import net.Indyuce.mmocore.skill.list.Ambers; import net.Indyuce.mmocore.skill.list.Ambers;
import net.Indyuce.mmocore.skill.list.Neptune_Gift; import net.Indyuce.mmocore.skill.list.Neptune_Gift;
import net.Indyuce.mmocore.skill.list.Sneaky_Picky;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -83,8 +83,12 @@ public class SkillManager implements MMOCoreManager {
config.save(); config.save();
} }
RegisteredSkill skill = new RegisteredSkill(handler, config.getConfig()); try {
this.skills.put(handler.getId(), skill); final RegisteredSkill skill = new RegisteredSkill(handler, config.getConfig());
this.skills.put(handler.getId(), skill);
} catch (RuntimeException exception) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load skill '" + handler.getId() + "': " + exception.getMessage());
}
} }
} }
} }

View File

@ -16,7 +16,7 @@
<description>Offer your players a brand new RPG experience!!</description> <description>Offer your players a brand new RPG experience!!</description>
<properties> <properties>
<revision>1.10-SNAPSHOT</revision> <revision>1.10.1-SNAPSHOT</revision>
<downloadSources>false</downloadSources> <downloadSources>false</downloadSources>
<downloadJavadocs>false</downloadJavadocs> <downloadJavadocs>false</downloadJavadocs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>