forked from Noppes/CustomNPCsAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.html
15 lines (15 loc) · 1.41 KB
/
overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<body>
<h1>Custom NPCs API</h1>
<p>This is the API for Custom NPCs scripting.</p>
<p>Basic knowledges about JavaScript are essential. For complete beginners, check <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript#tutorials">the Mozilla JavaScript tutorial</a>. Some knowledges on Java are recommended as well. <b>Note that Java and JavaScript are two different programming languages.</b></p>
<p>A player has to be an OP to access scripts.</p>
<p>To start scripting, either:</p>
<ul>
<li>use the Scripter item to interact (default control: mouse right click) with the air, an NPC, or a scripted block; or</li>
<li>sneak (default control: left shift) and interact (default control: mouse right click) with an scripted item in creative mode.</li>
</ul>
<p>Next, in the opened GUI, toggle "Enabled" to "Yes", create a new tab, and start writing a script.</p>
<p>Sometimes, the "Language" button below the "Enabled" button is grayed out. In this case, copy <code>nashorn.jar</code> from the <code>lib/ext</code> folder of the Java installation folder into the Minecraft <code>mods</code> folder and restart Minecraft. If the world is running on a server, this is only required to be done on the server side.</p>
<p>To get started, read the description of the {@link noppes.npcs.api.event} package.</p>
<p>A <a href="https://discord.gg/Urkn986">Discord server</a> is available for discussion on scripting.</p>
</body>