From 99e9580cd98a1a5656daa6d701d479e81fc35ed1 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Wed, 31 Dec 2014 11:15:28 +0000 Subject: [PATCH] Removing empty lib/canary.js and removing craftbukkit references from scriptcraft.js docs --- docs/API-Reference.md | 17 ++++++++--------- src/main/js/lib/canary.js | 3 --- src/main/js/lib/scriptcraft.js | 17 ++++++++--------- 3 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 src/main/js/lib/canary.js diff --git a/docs/API-Reference.md b/docs/API-Reference.md index c878ffc..02e93d5 100644 --- a/docs/API-Reference.md +++ b/docs/API-Reference.md @@ -486,14 +486,13 @@ module.exports instead of exports. ## Module Loading When the ScriptCraft Java plugin is first installed, a new -subdirectory is created in the craftbukkit/plugins directory. If your -craftbukkit directory is called 'craftbukkit' then the new -subdirectories will be ... +`scriptcraft` subdirectory is created. If your minecraft server +directory is called 'mcserver' then the new subdirectories will be ... - * craftbukkit/plugins/scriptcraft/ - * craftbukkit/plugins/scriptcraft/plugins - * craftbukkit/plugins/scriptcraft/modules - * craftbukkit/plugins/scriptcraft/lib + * mcserver/scriptcraft/ + * mcserver/scriptcraft/plugins + * mcserver/scriptcraft/modules + * mcserver/scriptcraft/lib ... The `plugins`, `modules` and `lib` directories each serve a different purpose. @@ -752,14 +751,14 @@ The `command()` function is used to expose javascript functions for use by non-o To use a callback for options (TAB-Completion) ... - + var utils = require('utils'); function boo( params, sender ) { var receiver = server.getPlayer( params[0] ); if ( receiver ){ echo( receiver, sender.name + ' says boo!'); } } - command( boo, bukkit.playerNames ); + command( boo, utils.playerNames ); See chat/colors.js or alias/alias.js or homes/homes.js for more examples of how to use the `command()` function. diff --git a/src/main/js/lib/canary.js b/src/main/js/lib/canary.js deleted file mode 100644 index 1a54e6b..0000000 --- a/src/main/js/lib/canary.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function( container ) { - -}; diff --git a/src/main/js/lib/scriptcraft.js b/src/main/js/lib/scriptcraft.js index 7261b9f..13d2fa7 100644 --- a/src/main/js/lib/scriptcraft.js +++ b/src/main/js/lib/scriptcraft.js @@ -46,14 +46,13 @@ module.exports instead of exports. ## Module Loading When the ScriptCraft Java plugin is first installed, a new -subdirectory is created in the craftbukkit/plugins directory. If your -craftbukkit directory is called 'craftbukkit' then the new -subdirectories will be ... +`scriptcraft` subdirectory is created. If your minecraft server +directory is called 'mcserver' then the new subdirectories will be ... - * craftbukkit/plugins/scriptcraft/ - * craftbukkit/plugins/scriptcraft/plugins - * craftbukkit/plugins/scriptcraft/modules - * craftbukkit/plugins/scriptcraft/lib + * mcserver/scriptcraft/ + * mcserver/scriptcraft/plugins + * mcserver/scriptcraft/modules + * mcserver/scriptcraft/lib ... The `plugins`, `modules` and `lib` directories each serve a different purpose. @@ -312,14 +311,14 @@ The `command()` function is used to expose javascript functions for use by non-o To use a callback for options (TAB-Completion) ... - + var utils = require('utils'); function boo( params, sender ) { var receiver = server.getPlayer( params[0] ); if ( receiver ){ echo( receiver, sender.name + ' says boo!'); } } - command( boo, bukkit.playerNames ); + command( boo, utils.playerNames ); See chat/colors.js or alias/alias.js or homes/homes.js for more examples of how to use the `command()` function.