Huge API Overhaul
Pre-release
Pre-release
Changelog
-
Huge API overhaul
-
Parchment is now used to parse and compile scripts
-
Deprecated many obsolete methods
-
Improved Javadocs
-
Removed Herobrine
Very Basic Script
var source = cotton.getSource();
var entity = (source.isEntity() ? source.getEntity() : undefined);
var name = source.getName();
var dim = source.getWorld().getDimension();
cotton.runCommand("tellraw @a \"" + name + " is in the world " + dim.getName() + "\"");
API Notes
cotton
is the CottonScript
. It is responsible for holding all necessary objects and is used for accessing ServerSource
. The ServerSource
object is the source (entity, player, console, script, etc.) which ran the script. Documentation will be found in the README section.