Library Powerful and concise commands- Commandler

Discussion in 'Resources' started by jammasterz, Jul 7, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    jammasterz

    Commandler
    Commandler is an API to make creating commands in Bukkit/Spigot plugins easier.

    Source repo: https://bitbucket.org/JamMaster/commandler

    Why should I use it?


    Why should you use an API when its pretty easy to write commands without it? There are a few reasons:
    • Easy and concise command definition- both normal and nested commands
    • No more repetitive if-statements to check the argument count- convenient RawArgIterator
    • Built-in permissions, no checks and setup required
    • Informative colored error messages
    • Support for custom argument parsers
    • Overloaded arguments- different argument set for the same command
    • Support for custom errors and error handlers
    • QA: Almost 100% test coverage
    Granted, defining and implementing commands without this is easy, but the implementation gets messy and repetitive, especially when multiple arguments are involved. Code snippets below demonstrate how easy it is to implement commands with this library.

    Planned features


    These are the features that I plan to add to the library:
    • Per-argument tab-completion
    • Overloaded commands- different argument and behavior for the same command
    • CommandSender whitelist

    Setup


    To use Commandler in your plugin, add the following repository and dependency to your `pom.xml`:
    Code:
    <repository>
        <id>spinalcraft-repo</id>
        <url>http://maven.spinalcraft.com</url>
    </repository>
    Code:
    <dependency>
        <groupId>com.jam.commandler</groupId>
        <artifactId>Commandler</artifactId>
        <version>1.0.0</version>
    </dependency>

    More info


    For more info, like how to use the library, visit the projects Bitbucket repository, https://bitbucket.org/JamMaster/commandler. I removed the description from here because its hard to format and the double maintenance was getting annoying.
     
    Last edited: Jul 29, 2017
  2. Offline

    jammasterz

    Permission handling is done. No need to add any code, permissions are checked automatically based on plugin and command names. It also checks user permissions in order to avoid listing commands that the user cant use, as demonstrated in the post above and in the README in the repository.
     
  3. Offline

    jammasterz

    Version 5.0, almost release!
    Changelog:
    • Fixed issue with phantom arguments
    • Added sub-command tabCompletion
    • Redid the way raw and processed arguments are stored
    • Added a ton of tests, gotta love Mockito
    • Added a few more built-in Args
     
  4. Offline

    jammasterz

    The release is here!
    Changelog:
    • Made the command construction much more user-friendly, disallowing invalid combinations
    • Added support for overloaded argument sets, more info in the README on repo page
    • Bugfixes
     
Thread Status:
Not open for further replies.

Share This Page