Mineuniverse
Log in Register
Plugins

SpellScript

Script your own spells with SpellScript!
by _ForgeUser7013278
Download Claim this project
1,475 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Admin Tools Fun Mechanics Teleportation

SpellScript is a Bukkit plugin which allows the user to manipulate the game environment to a degree using JavaScript.

The basic unit of the plugin is the Node. In Javscript the node is represented by the variable “node”. The node is the object through which the user will code. To create a node, the user first needs to encode the node’s command onto an ItemStack. This is done by writing the javascript command into a book or book-and-quill and then, while holding the book in your hand, running the command /SpellScript. Running this command will print the script onto the item stacks of any items that are within 5 meters of you. These item stacks now store the command and are ready to be activated.

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.

Take a look at the forums for spell development and examples: http://dev.bukkit.org/bukkit-plugins/spellscript/forum/

Here are some example scripts:

//This teleports the caster to the node’s location
node.teleport(node.getCaster(), node.getLocation());

//This gets the latest chat that was said and repeats it to the caster
var chat = node.getChatWrapper();
while (true){
	if (!chat.equals(node.getChatWrapper())){
		chat = node.getChatWrapper();
		node.announce(node.getCaster(), chat.getMessage())
	}
}
SpellScript v0.03
MC CB 1.7.9-R0.2
Release 2015-02-12 Get
SpellScript v0.03
MC CB 1.7.9-R0.2
Release 2015-02-09 Get
SpellScript v0.02
MC CB 1.7.9-R0.2
Release 2015-02-06 Get
SpellScript
MC CB 1.7.9-R0.2
Release 2015-02-03 Get

More from _ForgeUser7013278

MassRelay
9,751
Capsule
946
Ollivander's
18,982
CMA
18,249
GeometricMagic
10,241

You Might Also Like

MobHealth
Simple plugin to let you know the damage you just caused to a mob, and how much health it has left.
989,881
Player Heads
Lop off Player and all Mob Heads with configurable drop rates + pvp-farming nerf, includes detailed commands and permissions
979,351
Advanced Item Effects
Adds custom effects to any item including potion effects.
97,290
VoxelMore
"Sharing is caring."
9,999
SunSteel
A Golden Item Enhancement Plugin
9,880
Sneaker
Hide name tags above players' heads.
9,865