Redstone: A Spigot plugin generator.
npm install spigot-redstone4.2.3 minimum.
shell
$ [sudo] npm install -g spigot-redstone
`
Once installed you wil have access to the redstone command.
Usage
`shell
$ redstone [command] [args]
Display help:
$ redstone
`
$3
To create a new plugin you have to use the new command:
`shell
$ redstone plugin:new MyAwesomePlugin
`
The tool will ask you several questions and will create a directory containing
code ready to be imported in your IDE.
The project generated uses Maven as the dependency manager so you don't have to
add any Spigot or Craftbukkit jar to start coding.
$3
Using this tool, you can generate boilerplate code for several things.
#### Generate a command
Don't add / to the command, the tool will do it for you.
`shell
$ redstone make:command
`
This will create a class to handle the command and add it to plugin.yml.
You will have to add a line in your onEnable method to register the command, but the
tool will give you the line to add.
#### Generate an event listener
`shell
$ redstone make:listener
`
If you don't add it, Listener will be added at the end of the name (Example becomes ExampleListener).
#### Generate a custom event
`shell
$ redstone make:event
`
If you don't add it, Event will be added at the end of the name (Example becomes ExampleEvent).
To trigger your custom event, you have to do:
`java
Bukkit.getServer().getPluginManager().callEvent(new ExampleEvent(/ args /));
`
#### Generate a model
`shell
$ redstone make:model
`
$3
The tool can show you some infos about your plugin. You juste have to be inside
the plugin's root directory and do:
`shell
$ redstone plugin:info
`
$3
You can list Spigot versions (and know which is the last stable) by doing:
`shell
$ redstone spigot:info
`
$3
You can configure the tool using the tool itself.
`shell
list all config values
$ redstone config
show a config value
$ redstone config author.name
set a config value
$ redstone config author.name John Smith
`
Currently, you can configure author.name and author.website` which are used when you create a new plugin.