mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 13:09:11 +00:00
Add ability wheel and toggle abilities for enhanced gameplay
This commit is contained in:
1 parent
45a4313b70
commit
095709b9d2
9 files changed
+330
-10
No files matched your search
@@ -2,6 +2,7 @@ package noppes.npcs;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.npcs.controllers.SyncController;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityController;
|
||||
import kamkeel.npcs.network.PacketHandler;
|
||||
import kamkeel.npcs.network.packets.data.ParticlePacket;
|
||||
@@ -792,6 +793,9 @@ public class NoppesUtilServer {
|
||||
if (controller != null) {
|
||||
int index = 0;
|
||||
for (String uuid : controller.getCustomAbilityIds()) {
|
||||
Ability ability = controller.getCustomAbility(uuid);
|
||||
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++);
|
||||
|
||||
Reference in new issue
Block a user