Package de.oliver.fancynpcs.api
Class NpcData
java.lang.Object
de.oliver.fancynpcs.api.NpcData
-
Constructor Summary
ConstructorsConstructorDescriptionNpcData(String id, String name, UUID creator, String displayName, SkinFetcher.SkinData skin, org.bukkit.Location location, boolean showInTab, boolean spawnEntity, boolean collidable, boolean glowing, net.kyori.adventure.text.format.NamedTextColor glowingColor, org.bukkit.entity.EntityType type, Map<NpcEquipmentSlot, org.bukkit.inventory.ItemStack> equipment, boolean turnToPlayer, Consumer<org.bukkit.entity.Player> onClick, Map<ActionTrigger, List<NpcAction.NpcActionData>> actions, float interactionCooldown, float scale, Map<NpcAttribute, String> attributes, boolean mirrorSkin) Creates a default npc with random id -
Method Summary
Modifier and TypeMethodDescriptionaddAction(ActionTrigger trigger, int order, NpcAction action, String value) voidaddAttribute(NpcAttribute attribute, String value) addEquipment(NpcEquipmentSlot slot, org.bukkit.inventory.ItemStack item) voidapplyAllAttributes(Npc npc) getActions(ActionTrigger trigger) Map<NpcEquipmentSlot, org.bukkit.inventory.ItemStack> net.kyori.adventure.text.format.NamedTextColorgetId()floatorg.bukkit.LocationgetName()Consumer<org.bukkit.entity.Player> floatgetScale()getSkin()Deprecated.org.bukkit.entity.EntityTypegetType()booleanbooleanisDirty()booleanbooleanbooleanbooleanbooleanremoveAction(ActionTrigger trigger, NpcAction action) setActions(ActionTrigger trigger, List<NpcAction.NpcActionData> actions) setActions(Map<ActionTrigger, List<NpcAction.NpcActionData>> actions) setCollidable(boolean collidable) voidsetDirty(boolean dirty) setDisplayName(String displayName) setEquipment(Map<NpcEquipmentSlot, org.bukkit.inventory.ItemStack> equipment) setGlowing(boolean glowing) setGlowingColor(net.kyori.adventure.text.format.NamedTextColor glowingColor) setInteractionCooldown(float interactionCooldown) setLocation(org.bukkit.Location location) setMirrorSkin(boolean mirrorSkin) setOnClick(Consumer<org.bukkit.entity.Player> onClick) setScale(float scale) setShowInTab(boolean showInTab) setSkin(SkinFetcher.SkinData skin) Deprecated.setSpawnEntity(boolean spawnEntity) setTurnToPlayer(boolean turnToPlayer) setType(org.bukkit.entity.EntityType type)
-
Constructor Details
-
NpcData
public NpcData(String id, String name, UUID creator, String displayName, @Deprecated SkinFetcher.SkinData skin, org.bukkit.Location location, boolean showInTab, boolean spawnEntity, boolean collidable, boolean glowing, net.kyori.adventure.text.format.NamedTextColor glowingColor, org.bukkit.entity.EntityType type, Map<NpcEquipmentSlot, org.bukkit.inventory.ItemStack> equipment, boolean turnToPlayer, Consumer<org.bukkit.entity.Player> onClick, Map<ActionTrigger, List<NpcAction.NpcActionData>> actions, float interactionCooldown, float scale, Map<NpcAttribute, String> attributes, boolean mirrorSkin) -
NpcData
Creates a default npc with random id
-
-
Method Details
-
getId
-
getName
-
getCreator
-
getDisplayName
-
setDisplayName
-
getSkin
Deprecated.The skin system is deprecated and will be replaced with a slightly different system in the near future. -
setSkin
Deprecated.The skin system is deprecated and will be replaced with a slightly different system in the near future. -
getLocation
public org.bukkit.Location getLocation() -
setLocation
-
isShowInTab
public boolean isShowInTab() -
setShowInTab
-
isSpawnEntity
public boolean isSpawnEntity() -
setSpawnEntity
-
isCollidable
public boolean isCollidable() -
setCollidable
-
isGlowing
public boolean isGlowing() -
setGlowing
-
getGlowingColor
public net.kyori.adventure.text.format.NamedTextColor getGlowingColor() -
setGlowingColor
-
getType
public org.bukkit.entity.EntityType getType() -
setType
-
getEquipment
-
setEquipment
-
addEquipment
-
getOnClick
-
setOnClick
-
getActions
-
setActions
-
getActions
-
setActions
-
addAction
-
removeAction
-
isTurnToPlayer
public boolean isTurnToPlayer() -
setTurnToPlayer
-
getInteractionCooldown
public float getInteractionCooldown() -
setInteractionCooldown
-
getScale
public float getScale() -
setScale
-
getAttributes
-
addAttribute
-
applyAllAttributes
-
isMirrorSkin
public boolean isMirrorSkin() -
setMirrorSkin
-
isDirty
public boolean isDirty() -
setDirty
public void setDirty(boolean dirty)
-