mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 18:54:53 +00:00
feat: add built-in ability handling and UI updates for ability management
This commit is contained in:
1 parent
9dae4bae55
commit
2c00ecae9e
12 files changed
+201
-47
No files matched your search
@@ -781,12 +781,29 @@ public class NoppesUtilServer {
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String typeId : controller.getTypes()) {
|
||||
// Exclude built-in types from the NPC type list
|
||||
if (controller.isBuiltInType(typeId)) continue;
|
||||
map.put(typeId, index++);
|
||||
}
|
||||
}
|
||||
sendScrollData(player, map, EnumScrollData.ABILITY_TYPES);
|
||||
}
|
||||
|
||||
public static void sendBuiltInAbilitiesData(EntityPlayerMP player) {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>();
|
||||
AbilityController controller = AbilityController.Instance;
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String name : controller.getAbilityNames()) {
|
||||
Ability ability = controller.getAbility(name);
|
||||
if (ability != null) {
|
||||
map.put(ability.getName(), index++);
|
||||
}
|
||||
}
|
||||
}
|
||||
sendScrollData(player, map, EnumScrollData.BUILTIN_ABILITIES);
|
||||
}
|
||||
|
||||
public static void sendCustomAbilitiesData(EntityPlayerMP player) {
|
||||
HashMap<String, Integer> map = new HashMap<String, Integer>();
|
||||
kamkeel.npcs.controllers.data.ability.AbilityController controller = kamkeel.npcs.controllers.data.ability.AbilityController.Instance;
|
||||
|
||||
Reference in new issue
Block a user