All commands may be executed only by operators(op) or other plugin-users.
/npc create <npc-name> - creates the persistent NPC and gives you internal ID. This ID is a simple way to manipulate the NPCs.
/npc remove <id> - removing the ID-given NPC.
/npc removeall - removing all NPCs from server and memory.
/npc setrotatable <id> <true | false> - set the ID-given NPC rotatable or unrotatable to the online players.
/npc setunnamed <id> <true | false> - set the ID-given NPC unnamed or named to the online players. Note that this command
influences only on head-above names(not tab-list names).
/npc settabname <id> <tab-list-name> - set the ID-given NPC tab-list name. Note if name and tab-list name are various
some features may work unexpectly. For example if you set the NPC's name colored, tab-list name will be colored too
only if they equal.
/npc setuntabbed <id> <true | false> - remove the ID-given NPC tab-list name. It won't be seen by pressing tab.
/npc setname <id> <new-npc-name> - set the ID-given NPC head-above name. It will also set the tab-name if tab-name
is not set.
/npc setprefix <id> <prefix> - set the ID-given NPC prefix in head-above name and only if tab-name equals name, the tab-name
will also prefixed.
/npc setsuffix <id> <sufix> - set the ID-given NPC suffix in head-above name and only if tab-name equals name, the tab-name
will also suffixed.
/npc setcommand <id> <player | console> <left | right | both> <command-line> - set the ID-given NPC command executing
when player clicks left, right or both by mouse. If second argument set to "player" the command will be executed
by player, if "console" then will be executed by server's console. Command line is equal to how it would be written
by player, but without slash("/") in the start.
/npc setskin <id> <skin-holder-nickname> - set the ID-given NPC skin that's equal to namesake skinholder's skin.
The server should be restarted after this command executting to apply the skin changes.
/npc setpose <id> <standing | sleeping | crouching | dying | fall_flying | long_jumping | spin_attack | swimming> -
set the ID-given NPC pose equal to second argument.
/npc setrotation <id> <yaw> <pitch> - set the ID-given NPC static rotation. Yaw and pitch are bounded from 0 and 360.
/npc rotateme <id> - set the ID-given NPC statically rotated on your location.
/npc setequipment <id> - set the ID-given NPC equipment equal as yours.
/npc setglowing <id> <true | false> - set the ID-given NPC glowing depending on second argument. To change the glowing
color use /npc setcolor.
/npc setcolor <id> <color> - set the ID-given NPC's glowing, nick and tab-name(only if it's equal to name) to color
depending on second argument. For example color may be "red", "green", "yellow" etc.
/npc setcollidable <id> <true | false> - set the ID-given NPC collidable with players.
For plugin developers:
1.) Add plugin to server plugins folder. Also put ProtocolLib into folder. This plugin depends on its.
2.) Add "depend" section into your "plugin.yml". For example:
depend:
- EasyNPCs
3.) If you don't use Maven, add this plugin as external library to your project. Otherwise add following lines into your "pom.xml".
<dependency>
<groupId>family.salavat.easynpcs</groupId>
<artifactId>easy-npcs</artifactId>
<version>1.0</version>
</dependency>
Also you should add:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>install-external</id>
<phase>clean</phase>
<configuration>
<file>PATH_TO_INSTALLED_PLUGIN</file> //path to EasyNPCs.jar
<repositoryLayout>default</repositoryLayout>
<groupId>family.salavat.easynpcs</groupId>
<artifactId>easy-npcs</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>