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