small fix

Fixed player classes preventing the plugin from loading if they didn't
specify a display name
This commit is contained in:
ASangarin 2020-09-23 01:27:45 +02:00
parent c724b8ecf4
commit b27ce4bd1b

View File

@ -65,7 +65,7 @@ public class PlayerClass extends PostLoadObject {
this.id = id.toUpperCase().replace("-", "_").replace(" ", "_"); this.id = id.toUpperCase().replace("-", "_").replace(" ", "_");
name = MMOLib.plugin.parseColors(config.getString("display.name")); name = MMOLib.plugin.parseColors(config.getString("display.name", "INVALID DISPLAY NAME"));
icon = MMOCoreUtils.readIcon(config.getString("display.item", "BARRIER")); icon = MMOCoreUtils.readIcon(config.getString("display.item", "BARRIER"));
if (config.contains("display.texture") && icon.getType() == VersionMaterial.PLAYER_HEAD.toMaterial()) if (config.contains("display.texture") && icon.getType() == VersionMaterial.PLAYER_HEAD.toMaterial())