You will want to use an anvil to name the item stacks. Once you name the item anything you want (it has to be without spaces), you can then say that word and as long as you are within 10 meters of the item on the ground, in an item frame, or in a player’s inventory, the item will run the script inside of it. You can also give the script arguments by adding them after the activation word. These arguments will be accessible through “node.getArgs()”.
The node will appear in the world as a mobspawner flame effect. The node has an attribute called “power” which it uses to execute some tasks. Looking through the javadocs for the node class will show you how much each task costs in power. Once the node runs out of power, it will die, even if it’s command hasn’t finished executing.
Keep in mind: All methods causing a change to anything in Minecraft (placing a block, setting an entity on fire, etc.) take at least 1 tick to occur. Methods that only retrieve data or affect Nodes occur immediately. For example, if node1 is taking health away from a player and node2 is taking power away from node1, then node2 will probably deplete node1 of power much sooner than node1 will deplete the player of health.
When you activate a node, you will get a piece of paper with a long lore. Right clicking this piece of paper in your hand will kill the node immediately.
The source for this plugin can be found here:https://github.com/cakenggt/SpellScript
The JavaDocs for the plugin can be found here (make sure to look at the docs for Node):http://aleclownes.com/jd/SpellScript/
To view the methods made available to JS, look at the javadocs or the source at github. Only public methods in Node and all of the Wrappers are usable in scripts.