mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 16:59:43 +00:00
Remove all Legacy Ability Content, cleanup API.
- Add Script Tab to Abilities - Add Custom Ability - Add Icon Support for Abilities / Default Icon Support - Remove Icon Tab and throw it into Effects with allowed Override - Removed Deprecated API Sources
This commit is contained in:
1 parent
936dc7f0cc
commit
675c4ef4f9
50 files changed
+1488
-938
No files matched your search
@@ -28,8 +28,8 @@ public class ScriptPlayerAbilityData implements IPlayerAbilityData {
|
||||
|
||||
@Override
|
||||
public void unlockAbility(String key) {
|
||||
// Validate ability exists and allows players
|
||||
Ability ability = AbilityController.Instance.resolveAbility(key);
|
||||
// Validate ability exists and allows players (peek avoids deep copy)
|
||||
Ability ability = AbilityController.Instance.peekAbility(key);
|
||||
if (ability == null) {
|
||||
return; // Ability doesn't exist
|
||||
}
|
||||
@@ -94,6 +94,11 @@ public class ScriptPlayerAbilityData implements IPlayerAbilityData {
|
||||
data.interruptCurrentAbility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completeCurrentAbility() {
|
||||
data.completeCurrentAbility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOnCooldown() {
|
||||
return data.isOnCooldown();
|
||||
@@ -162,7 +167,7 @@ public class ScriptPlayerAbilityData implements IPlayerAbilityData {
|
||||
* Uses the same resolution as unlockAbility: registry key for built-in, UUID for custom.
|
||||
*/
|
||||
private String resolveCanonicalKey(String key) {
|
||||
Ability ability = AbilityController.Instance.resolveAbility(key);
|
||||
Ability ability = AbilityController.Instance.peekAbility(key);
|
||||
if (ability != null && ability.getId() != null) {
|
||||
return ability.getId();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user