Frequently Asked Questions about ScriptCraft (FAQ)

How do I find code samples for a given ScriptCraft function?

  1. Search the Writing Minecraft Plugins repo. For example, try searching for sign at the top of the page. The search results are shown. Click the file name in blue to see the whole file.
  2. Search the same way in the ScriptCraft project.

How do I run plain old Minecraft commands from my ScriptCraft code?

Use the slash moduleIn your code it would look like
var slash = require('slash');
  'time set 6000',
], server);

My ScriptCraft code doesn't work as expected. How do I troubleshoot?

Try this checklist:
  1. Runs the latest version of CanaryMod and ScriptCraft?
  2. The installation passes the basic test where /js 1+1 in the chat gives a printout of 2.0?
  3. Has run /js refresh() since the code was updated in .js file/s?
  4. No error printouts in the server's console log?
  5. Have you tried running individual code snippets in the Minecraft chat? Sample
More items to be added.