Fix protocollib detection for /npc mirror

This commit is contained in:
fullwall 2024-01-02 23:31:02 +08:00
parent 007c92f797
commit 1416557ce3
1 changed files with 1 additions and 1 deletions

View File

@ -1708,7 +1708,7 @@ public class NPCCommands {
@Requirements(selected = true, ownership = true)
public void mirror(CommandContext args, CommandSender sender, NPC npc, @Flag("name") Boolean name)
throws CommandException {
if (protocolListener == null)
if (((Citizens) CitizensAPI.getPlugin()).getProtocolLibListener() == null)
throw new CommandException("ProtocolLib must be enabled to use this feature");
MirrorTrait trait = npc.getOrAddTrait(MirrorTrait.class);