Fixed selecting a subclass would act like selecting a new class
This commit is contained in:
Aria 2019-10-18 20:11:10 +02:00
parent 26350cb4ca
commit d78904ec47
2 changed files with 5 additions and 5 deletions

View File

@ -30,21 +30,21 @@ public class SubclassConfirmation extends EditableInventory {
public Placeholders getPlaceholders(PluginInventory inv, int n) { public Placeholders getPlaceholders(PluginInventory inv, int n) {
Placeholders holders = new Placeholders(); Placeholders holders = new Placeholders();
holders.register("class", ((ClassConfirmationInventory) inv).profess.getName()); holders.register("class", ((SubclassConfirmationInventory) inv).profess.getName());
return holders; return holders;
} }
} : new NoPlaceholderItem(config); } : new NoPlaceholderItem(config);
} }
public GeneratedInventory newInventory(PlayerData data, PlayerClass profess, PluginInventory last) { public GeneratedInventory newInventory(PlayerData data, PlayerClass profess, PluginInventory last) {
return new ClassConfirmationInventory(data, this, profess, last); return new SubclassConfirmationInventory(data, this, profess, last);
} }
public class ClassConfirmationInventory extends GeneratedInventory { public class SubclassConfirmationInventory extends GeneratedInventory {
private final PlayerClass profess; private final PlayerClass profess;
private final PluginInventory last; private final PluginInventory last;
public ClassConfirmationInventory(PlayerData playerData, EditableInventory editable, PlayerClass profess, PluginInventory last) { public SubclassConfirmationInventory(PlayerData playerData, EditableInventory editable, PlayerClass profess, PluginInventory last) {
super(playerData, editable); super(playerData, editable);
this.profess = profess; this.profess = profess;

View File

@ -122,7 +122,7 @@ public class SubclassSelect extends EditableInventory {
return; return;
} }
InventoryManager.CLASS_CONFIRM.newInventory(playerData, MMOCore.plugin.classManager.get(tag), this).open(); InventoryManager.SUBCLASS_CONFIRM.newInventory(playerData, MMOCore.plugin.classManager.get(tag), this).open();
} }
} }
} }