- Supported Minecraft Versions
- 1.12
About:
NPCore is a skript API that provides a few functions that allow you to implement NPCs onto your server
Features:
- Create NPCs
- Show NPCs only to certain players (clientside)
- Hide NPCs from the tablist
- Remove NPCs
Usage:
To create an NPC you have to use the function npccreateNPC()
- parameters
Do do this you have to use the function npcshowNPC()
-parameters
And finally, to hide an NPC from a player after having shown it, you have to use the function npcdestroyNPC(id, player)
How flags work:
Flags are in the format "id:value" and are separated by spaces e.g.
"flag1:value1 flag2:value2"
Currently available flags for when creating an NPC are:
texture: a string containing the texture of a skin
signature: a string containing the signature of a skin (both the texture and signature flags are required for a skin to be used)
uuid: a custom uuid to be used (if not used the NPC will get a random uuid)
skinlayers: the decimal value of a byte which determines what segments of the 2nd layer of a skin to display (defaults to all segments)
(more to be added e.g. different entity NPCs i.e. not only players)
Dependencies:
Skript, skript-mirror, Mundosk and protocollib
Note: NPCs will not automatically be re-shown to players if they leave or unload the entity (move far away) and come back
NPCore is a skript API that provides a few functions that allow you to implement NPCs onto your server
Features:
- Create NPCs
- Show NPCs only to certain players (clientside)
- Hide NPCs from the tablist
- Remove NPCs
Usage:
To create an NPC you have to use the function npccreateNPC()
- parameters
- a unique id for the NPC so the API can easily distinguish between them
- a location for the NPC to appear (currently not editable but is planned)
- the name displayed above the NPC's head
- any flags (see below) (optional)
Do do this you have to use the function npcshowNPC()
-parameters
- the unique id of a created NPC
- the player to show the NPC to
- whether or not the NPC should appear in the tablist (defaults to false)
- how many ticks to wait before hiding the NPC from the tablist (shouldn't be touched unless you know what you're doing [defaults to 10 ticks])
And finally, to hide an NPC from a player after having shown it, you have to use the function npcdestroyNPC(id, player)
How flags work:
Flags are in the format "id:value" and are separated by spaces e.g.
"flag1:value1 flag2:value2"
Currently available flags for when creating an NPC are:
texture: a string containing the texture of a skin
signature: a string containing the signature of a skin (both the texture and signature flags are required for a skin to be used)
uuid: a custom uuid to be used (if not used the NPC will get a random uuid)
skinlayers: the decimal value of a byte which determines what segments of the 2nd layer of a skin to display (defaults to all segments)
(more to be added e.g. different entity NPCs i.e. not only players)
Dependencies:
Skript, skript-mirror, Mundosk and protocollib
Note: NPCs will not automatically be re-shown to players if they leave or unload the entity (move far away) and come back