mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 02:59:42 +00:00
Abilities are now Stored by Name not UUID
This commit is contained in:
1 parent
bc336abf9d
commit
c7956a24a6
12 files changed
+171
-185
No files matched your search
@@ -810,13 +810,10 @@ public class NoppesUtilServer {
|
||||
kamkeel.npcs.controllers.data.ability.AbilityController controller = kamkeel.npcs.controllers.data.ability.AbilityController.Instance;
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String uuid : controller.getCustomAbilityIds()) {
|
||||
Ability ability = controller.getCustomAbility(uuid);
|
||||
for (String name : controller.getCustomAbilityNames()) {
|
||||
Ability ability = controller.getCustomAbility(name);
|
||||
if (ability == null || !ability.getAllowedBy().allowsNpc()) continue;
|
||||
|
||||
String name = controller.getCustomAbilityName(uuid);
|
||||
if (name == null || name.isEmpty()) name = uuid;
|
||||
map.put(name + "\t" + uuid, index++);
|
||||
map.put(name, index++);
|
||||
}
|
||||
}
|
||||
sendScrollData(player, map, EnumScrollData.CUSTOM_ABILITIES);
|
||||
|
||||
Reference in new issue
Block a user