forked from Upstream/mmocore
Fixed a bug related to SubClassSelect GUI.
This commit is contained in:
parent
aa6a1d7101
commit
a125320dd0
@ -16,6 +16,7 @@ import net.Indyuce.mmocore.api.ConfigMessage;
|
|||||||
import net.Indyuce.mmocore.api.SoundEvent;
|
import net.Indyuce.mmocore.api.SoundEvent;
|
||||||
import net.Indyuce.mmocore.api.player.profess.Subclass;
|
import net.Indyuce.mmocore.api.player.profess.Subclass;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.NamespacedKey;
|
import org.bukkit.NamespacedKey;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
@ -112,8 +113,8 @@ public class SubclassSelect extends EditableInventory {
|
|||||||
InventoryManager.CLASS_SELECT.newInventory(playerData).open();
|
InventoryManager.CLASS_SELECT.newInventory(playerData).open();
|
||||||
|
|
||||||
if (item.getFunction().startsWith("sub-class")) {
|
if (item.getFunction().startsWith("sub-class")) {
|
||||||
String classId = item.getFunction().substring(10);
|
String classId = UtilityMethods.ymlName(item.getFunction().substring(10));
|
||||||
PlayerClass profess = MMOCore.plugin.classManager.get(classId);
|
PlayerClass profess = MMOCore.plugin.classManager.get(UtilityMethods.enumName(classId));
|
||||||
if (playerData.getClassPoints() < 1) {
|
if (playerData.getClassPoints() < 1) {
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(getPlayer());
|
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(getPlayer());
|
||||||
|
Loading…
Reference in New Issue
Block a user