Skip to content

Huge API Overhaul

Pre-release
Pre-release
Compare
Choose a tag to compare
@sylv256 sylv256 released this 05 Jun 21:45
· 2 commits to master since this 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.