-
-
Notifications
You must be signed in to change notification settings - Fork 0
API Options
Eisi05 edited this page Mar 8, 2026
·
2 revisions
NpcAPI uses NpcOption<T, S> to configure behavior/appearance.
import de.eisi05.npc.api.objects.NpcOption;
import org.bukkit.ChatColor;
npc.setOption(NpcOption.GLOWING, ChatColor.RED);
// make NPC automatically look at nearby players (distance in blocks)
npc.setOption(NpcOption.LOOK_AT_PLAYER, 6.0);Option packets are sent to current viewers automatically when you call setOption(...).
Call one of:
npc.reload();
// or, if the NPC is not shown yet:
npc.showNpcToAllPlayers();Some options only work on newer server versions.
Internally, each option can declare a minimum version (NpcOption#since(Versions)). If an option is not compatible, it won’t generate packets.
-
NpcOption.SKIN/NpcOption.USE_PLAYER_SKIN NpcOption.SHOW_TAB_LISTNpcOption.GLOWINGNpcOption.POSENpcOption.SCALENpcOption.EQUIPMENTNpcOption.LATENCYNpcOption.HIDE_NAMETAGNpcOption.SKIN_PARTSNpcOption.ENTITYNpcOption.VISIBILITYNpcOption.COLLISION