Make /npc mount use mount trait

This commit is contained in:
fullwall 2024-09-22 00:14:11 +08:00
parent 905dff7eec
commit 7935dd2ab6

View File

@ -1996,7 +1996,7 @@ public class NPCCommands {
if (mount.equals(npc)) if (mount.equals(npc))
throw new CommandException(Messages.MOUNT_TRIED_TO_MOUNT_NPC_ON_ITSELF); throw new CommandException(Messages.MOUNT_TRIED_TO_MOUNT_NPC_ON_ITSELF);
NMS.mount(mount.getEntity(), npc.getEntity()); npc.getOrAddTrait(MountTrait.class).setMountedOn(mount.getUniqueId());
return; return;
} }
if (args.hasFlag('c')) { if (args.hasFlag('c')) {