mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 07:19:05 +00:00
Enhance ability selection and display: add toggleable ability handling, improve ability name color coding, and update ability selection messaging
This commit is contained in:
1 parent
45d05b9157
commit
ce24c0a4ff
7 files changed
+86
-16
No files matched your search
@@ -304,7 +304,13 @@ public class AbilityController implements IAbilityHandler {
|
||||
keys.add(id);
|
||||
}
|
||||
}
|
||||
keys.addAll(customAbilities.keySet());
|
||||
// Use ability names for custom abilities (instead of UUIDs) for readable tab completion
|
||||
for (Ability ability : customAbilities.values()) {
|
||||
String name = ability.getName();
|
||||
if (name != null && !name.isEmpty()) {
|
||||
keys.add(name);
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
@@ -318,9 +324,13 @@ public class AbilityController implements IAbilityHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Map.Entry<String, Ability> entry : customAbilities.entrySet()) {
|
||||
if (entry.getValue().getAllowedBy().allowsPlayer()) {
|
||||
keys.add(entry.getKey());
|
||||
// Use ability names for custom abilities (instead of UUIDs) for readable tab completion
|
||||
for (Ability ability : customAbilities.values()) {
|
||||
if (ability.getAllowedBy().allowsPlayer()) {
|
||||
String name = ability.getName();
|
||||
if (name != null && !name.isEmpty()) {
|
||||
keys.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
|
||||
Reference in new issue
Block a user