mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-11-18 06:24:17 +01:00
In /skills, auto select skill if there's only one
This commit is contained in:
parent
54956d55fc
commit
c712f82bf2
@ -508,6 +508,15 @@ public class SkillList extends EditableInventory {
|
||||
enablePagination(skillSlots.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen() {
|
||||
|
||||
// Auto select skill if there is only one skill slot
|
||||
if (skillSlots.size() == 1) {
|
||||
selected = skills.get(getPageIndex(0));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getRawName() {
|
||||
return guiName.replace("{skill}", selected.getSkill().getName());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user