Git Product home page Git Product logo

delegate's Introduction

State GitHub Workflow Status License Kotlin

Delegate

Delegate is a general-purpose command framework specifically designed for different Minecraft server platforms. Developers can use this framework, designed with fluent interfaces in mind to automatically parse commands, resolve contexts and execute actions.

Why choose Delegate?

In the past, many command frameworks have tried to solve the problem of allowing developers to create commands in a simple and intuitive way. However, most of these frameworks either became convoluted very quickly, or simply didn't support enough platforms. Delegate aims to solve these problems by allowing the creation of simple commands, but also allows for the creation of complex commands with subcommands, tab completion, brigadier support and more. Furthermore, Delegate is completely tested with unit tests and use-case tests, ensuring the default implementations will work as intended on all platforms.

Features

  • Simple and powerful command creation/execution
  • Autonomous command handling
  • Platform-agnostic (Supported Platforms)
  • Brigadier integration
  • Automatic tab completion
  • Runtime-based command registration and execution
  • Optional use of annotations
  • Full test coverage with using unit tests and integration tests
  • Many more...

Note: Some features are only available on certain platforms. Please check the feature matrix below to see which features are available on which platform.

Supported Platforms

Currently, Delegate supports the following platforms:

  • Bukkit
  • Spigot
  • Paper
  • Velocity

Getting Started

Examples

public class ExamplePlugin extends JavaPlugin {
    
    @Override
    public void onEnable() {
        //  Create / Register a new Delegate command
        Delegate.create("hello", "Broadcasts a message to the server")
                .withString("name", "The name of the person you want to say hello to")
                .withConsumerAction((commander, args) -> Bukkit.getServer().broadcastMessage("Hello, %s".formatted(args.get("name"))))
                .build();
    }
    
}

When you are finished creating the definition of the command, the build() method can be called. This will construct and register the command behind the scenes. More information can be found on the Delegate Gitbook.

Feature Matrix

The feature matrix describes which major features are available for which platform and which are currently planned.

Feature Spigot Paper Velocity Sponge BungeeCord Waterfall
Fluent Interface โœ” โœ” ๐Ÿ—๏ธ ๐Ÿ—๏ธ โŒ โŒ
Brigadier โœ” โœ” ๐Ÿ—๏ธ ๐Ÿ—๏ธ โŒ โŒ
Tab Completion โœ” โœ” ๐Ÿ—๏ธ ๐Ÿ—๏ธ โŒ โŒ

Documentation

Documentation on how to get started is available on the Delegate Gitbook.

Since Delegate is still in development, the documentation is still a work in progress. A JavaDoc will be available soon.

Latest Changes

Version 0.0.1

  • First version of Delegate. Currently, in the process of writing unit tests to ensure compatibility with all platforms.

Icons provided by Flaticon

delegate's People

Contributors

polyrocketmatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

delegate's Issues

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.