Tidying up readme

This commit is contained in:
walterhiggins 2015-01-11 08:53:41 +00:00
parent 87a3efd221
commit 30340379f4

View file

@ -16,16 +16,20 @@ files in a directory.
This is a simple mod in a file called greet.js in the scriptcraft/plugins directory...
```javascript
exports.greet = function( player ) {
echo( player, 'Hello ' + player.name );
};
function greet( player ) {
echo( player, 'Hello ' + player.name );
}
exports.greet = greet;
```
At the in-game prompt, type...
At the in-game prompt, type:
/js greet(self)
```javascript
/js greet(self)
```
... to see the greeting. Anything you can do using CanaryMod or CraftBukkit's API in Java, you can do using ScriptCraft in Javascript.
Anything you can do using the CanaryMod or CraftBukkit APIs in Java,
you can do using ScriptCraft in Javascript.
# Description
@ -33,12 +37,20 @@ ScriptCraft is a plugin for Minecraft Servers which lets operators,
administrators and plug-in authors customize the game using
Javascript. ScriptCraft makes it easier to create your own mods. Mods
can be written in Javscript and can use the full [CanaryMod API][cm]
or [Bukkit API][bukkit]. I recommend using CanaryMod because
CraftBukkit is no longer being actively developed due to a legal
dispute. The ScriptCraft mod also lets you enter javascript commands
at the in-game prompt. To bring up the in-game prompt press the `/`
key then type `js ` followed by any javascript statement.
For example: `/js 1 + 1` will print 2.
or [Bukkit API][bukkit]. ScriptCraft works with all of the following Minecraft Server software:
* [CanaryMod][cm] (Recommended)
* [SpigotMC][spigot] (Bukkit-compatible)
* [GlowStone][gs] (Bukkit-compatible)
[spigot]: http://www.spigotmc.org/
[gs]: http://www.glowstone.net/
I recommend using CanaryMod because CraftBukkit is no longer being
actively developed due to a legal dispute. The ScriptCraft mod also
lets you enter javascript commands at the in-game prompt. To bring up
the in-game prompt press the `/` key then type `js ` followed by any
javascript statement. For example: `/js 1 + 1` will print 2.
ScriptCraft also includes many objects and functions to make building
and modding easier using Javascript. The Javascript `Drone` object
@ -55,29 +67,28 @@ Minecraft.
# Prerequisites
You will need to have Java version 6 or later installed on your
machine. Check the version by typing `java -version` at a command
prompt. You will need to [install CanaryMod][ic] or [install Bukkit][ib]
on your machine (I recommend using CanaryMod as Bukkit is
no longer being actively developed). CanaryMod and Bukkit are both
versions of Minecraft (server) that make it easy to install plugins
and customize Minecraft. You can [download the CanaryMod server
here.][ic]
* You will need to have Java version 6 or later installed on your
machine. Check the version by typing `java -version` at a command
prompt.
* You will need to [install CanaryMod][ic] on your
machine. CanaryMod is a customized version of Minecraft Server that
makes it easy to install plugins and customize Minecraft. You can
[download the CanaryMod server here.][ic]
# Installation
If you don't want to compile from source, you can [download the
compiled plugin here][dl] and copy it the craftbukkit's plugins
directory.
compiled plugin here][dl] and copy it to the CanaryMod plugins directory.
# Post Install
Once installed, a new scriptcraft/plugins directory is automatically created. All files in the scriptcraft/plugins
directory will be automatically loaded when the server starts. *Only
players who are ops can use this plugin.* You can grant a player `op`
privileges by typing 'op <username>' at the server console prompt or
by adding the player's username to the ops.txt file in your
server directory.
Once installed, a new scriptcraft/plugins directory is automatically
created. All files in the scriptcraft/plugins directory will be
automatically loaded when the server starts. *Only players who are
ops can use this plugin.* You can grant a player `op` privileges by
typing 'op <username>' at the server console prompt or by adding the
player's username to the ops.txt file in your server directory.
Launch the server, then launch the Minecraft client and create a new
server connection. The IP address will be `localhost` . Once you've
@ -90,19 +101,16 @@ ground-level block and type ...
blocks high by 1 block long. Take a look at the
src/main/javascript/drone/drone.js file to see what ScriptCraft's
drone can do. If you're interested in customizing minecraft beyond
just creating new buildings, take a look at [./homes/homes.js][homes] for examples of how to create a
javascript plugin for Minecraft.
[ho]: blob/master/src/main/js/plugins/homes/homes.js
[ar]: blob/master/src/main/js/plugins/arrows.js
[si]: blob/master/src/main/js/modules/signs/menu.js
just creating new buildings, take a look at [the homes mod][homes] for an example of how to create a more fully-featured javascript plugin for Minecraft.
A Javascript mod for minecraft is just a javascript source file (.js)
located in the craftbukkit/plugins/scriptcraft/plugins directory. All .js files in this
directory will be automatically loaded when the craftbukkit server
starts. To get started writing your own mod, first take a look at some
of the existing mods in the [homes][ho], [arrows][ar] and
[signs][si] directories.
located in the scriptcraft/plugins directory. All .js files in this
directory will be automatically loaded when the server starts. To get
started writing your own mod, take a look at some of the
[examples][examples].
[ho]: src/main/js/plugins/homes/homes.js
[examples]: src/main/js/plugins/examples/
# Additional information
@ -127,9 +135,7 @@ ScriptCraft plugin...
[dl]: http://scriptcraftjs.org/download
[api]: https://ci.visualillusionsent.net/job/CanaryLib/javadoc/
[ib]: http://wiki.bukkit.org/Setting_up_a_server
[ic]: http://canarymod.net/releases
[cbdl]: http://dl.bukkit.org/downloads/craftbukkit/
[cmapi]: https://ci.visualillusionsent.net/job/CanaryLib/javadoc/
# Contributing