Add inventory trait in horseequipper

This commit is contained in:
fullwall 2024-07-19 23:49:33 +08:00
parent d2dedef737
commit 155d9c9730

View File

@ -4,11 +4,13 @@ import org.bukkit.entity.Player;
import org.bukkit.entity.Tameable;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.trait.trait.Inventory;
import net.citizensnpcs.util.NMS;
public class HorseEquipper implements Equipper {
@Override
public void equip(Player equipper, NPC toEquip) {
toEquip.getOrAddTrait(Inventory.class);
Tameable horse = (Tameable) toEquip.getEntity();
NMS.openHorseScreen(horse, equipper);
}