O'Reilly logo

A Beginner’s Guide to Writing Minecraft Plugins in JavaScript by Walter Higgins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. ScriptCraft Variables

In this appendix, I’ll cover the variables provided by ScriptCraft.

The server Variable

The server variable is a global variable provided by ScriptCraft. It refers to the net.canarymod.api.Server object, which is a Java object representing the Minecraft server. Refer to https://ci.visualillusionsent.net/job/CanaryLib/javadoc/net/canarymod/api/Server.html for full details of all the methods available for this object.

The __plugin Variable

This global variable is a reference to the ScriptCraft plugin. Some CanaryMod API methods require an net.canarymod.plugin.Plugin object as a parameter. If you need to call such methods from JavaScript, you should provide the __plugin variable where an object of type net.canarymod.plugin.Plugin ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required