Update README.md

This commit is contained in:
Walter Higgins 2014-01-30 00:41:59 +00:00
parent e52b665583
commit ca46607a47

View file

@ -14,14 +14,16 @@ files in a directory.
This is a simple mod in a file called greet.js in the scriptcraft/plugins directory... This is a simple mod in a file called greet.js in the scriptcraft/plugins directory...
exports.greet = function( player ) { ```javascript
player.sendMessage('Hello ' + player.name ); exports.greet = function( player ) {
}; player.sendMessage('Hello ' + player.name );
};
```
At the in-game prompt, type... At the in-game prompt, type...
/js greet(self) /js greet(self)
... to see the greeting. Anything you can do using CraftBukkit's API in Java, you can do using ScriptCraft in Javascript. ... to see the greeting. Anything you can do using CraftBukkit's API in Java, you can do using ScriptCraft in Javascript.
# Description # Description