npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

spigot-redstone

v0.2.0

Published

Redstone: A Spigot plugin generator.

Downloads

8

Readme

Redstone - A Spigot plugins manager

NPM Version Build Status

Demo

This tool can generate the boilerplate code for your next Spigot plugin.

It can also generate code for several things like commands, listeners, custom events, etc.

Installation

To install this tool you need Node.js version 4.2.3 minimum.

Then you can run:

$ [sudo] npm install -g spigot-redstone

Once installed you wil have access to the redstone command.

Usage

$ redstone [command] [args]

# Display help:
$ redstone

Create a new plugin

To create a new plugin you have to use the new command:

$ 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.

Generators

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.

$ redstone make:command <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

$ redstone make:listener <name>

If you don't add it, Listener will be added at the end of the name (Example becomes ExampleListener).

Generate a custom event

$ redstone make:event <name>

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:

Bukkit.getServer().getPluginManager().callEvent(new ExampleEvent(/* args */));

Generate a model

$ redstone make:model <name>

Get informations about your plugin

The tool can show you some infos about your plugin. You juste have to be inside the plugin's root directory and do:

$ redstone plugin:info

Spigot versions

You can list Spigot versions (and know which is the last stable) by doing:

$ redstone spigot:info

Config

You can configure the tool using the tool itself.

# 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.

Licence

MIT License

Copyright (c) 2016 Nathan Boiron

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.