Giter Club home page Giter Club logo

commandalias's Introduction

CommandAlias

The source for an easy to setup, lightweight plugin for your Spigot server written in Kotlin. Resource Page

Developer API

Since 1.5-RELEASE, there is real support for API usage. This API can be used for

  • (Un)registering aliases, run conditions, placeholders
  • Toggling an alias
  • Processing a placeholder string

Accessing the developer API

  1. Add "CommandAlias" as a dependency or soft dependency to your plugin.
  2. Add the jar to the dependencies (sorry no maven repo)
  3. EITHER listen on CAPluginReloadEvent (see the note below to see why)
  4. OR Get the instance of the plugin through JavaPlugin#getPlugin or through PluginManager#getPlugin
  5. Cast said instance to the CommandAliasAPI interface.
  6. Have fun
Important note

Register your aliases/placeholders/run conditions on the event CAPluginReloadEvent. Why? Because this event is called whenever the plugin is reloaded, including at startup. When the plugin is reloaded it will clear everything. Though, to do this, you have to load before CommandAlias so you can register before the event is called. Or you load after and register in your onEnable and then again when CAPluginReloadEvent is called.

To actually add your add your own stuff:
  1. Make an instance of what you want to make (RunCondition/AliasCommand/CAHook)
  2. Register it with the API via the event. If you read the API it will become clear.

If you have any queries come to https://www.elliepotato.de/support

commandalias's People

Contributors

literallyellie avatar selebrator avatar zyephoenix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.