Coder Social home page Coder Social logo

fixeddev / command-flow Goto Github PK

View Code? Open in Web Editor NEW
106.0 8.0 20.0 838 KB

A flexible and platform-agnostic command framework for Java 8+

Home Page: https://unnamed.team/docs/command-flow

License: MIT License

Java 100.00%
bukkit bungee command cf bukkit-commands discord minecraft-brigadier bungee-commands discord-bot-commands discord-commands

command-flow's Introduction

command-flow

Build Status MIT License Discord

A flexible command framework which removes lots of boilerplate code used in commands

Check the documentation for installation and usage information for this project

command-flow's People

Contributors

4drian3d avatar alexissdev avatar call4han avatar cumhilo avatar emmilydev avatar fixeddev avatar gatitouwu avatar mattyhd0 avatar mcmdev avatar oczi avatar pixeldev avatar ynverxe avatar yusshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

command-flow's Issues

Don't convert from adventure's `Component` to BungeeCord chat `BaseComponent[]` on Paper

(commandflow-bukkit)
Paper supports sending adventure Component messages natively.

Maybe add an interface like:

interface ComponentSender {
    void sendMessage(Player player, Component component);
}

And create a Paper implementation:

class PaperComponentSender implements ComponentSender {
    @Override
    public void sendMessage(Player player, Component component) {
        player.sendMessage(component); // Paper method 
    }
}

And if we are not on Paper, fall back to an implementation that converts components to bungeecord-chat base components.

https://github.com/unnamed/command-flow/blob/master/Bukkit/src/main/java/me/fixeddev/commandflow/bukkit/BukkitCommandWrapper.java#L105

Make `AnnotatedCommandTreeBuilder` accept a function to convert annotation strings to Components

Currently the fromString method is private and always outputs either a TranslatableComponent or a TextComponent, it would be nice if it could accept a converter function.

https://github.com/unnamed/command-flow/blob/f3723639e1177474c9edcbabaffd27e73a5f7176/Universal/src/main/java/me/fixeddev/commandflow/annotated/AnnotatedCommandTreeBuilderImpl.java#L217

Example use cases: libraries like MiniMessage and MineDown(adventure?) allow converting strings to components and it would be nice to support them from the annotations.

Note that MiniMessage also supports using translatable components like: <lang:some.translation.key>, similar to the current implementation which accepts %translatable:some.translation.key%, which is limited (can't add text before or after)

Problems trying to install with maven

Hello! I really liked your command manager, and I wanted to try to use it, but when I want to use it with maven I get several errors, I have everything set, as the read.me says, the library is still running or something I'm doing wrong ?, I await your answer, thanks for reading
image
image
image
image

ArgumentPart suggestions

Well, I think there's a issue with part suggestions in sub-commands, if we have a empty parent sub-command then the next argument position wouldn't be suggested correctly.

There is an example, as you can see we have a empty parent with a custom part called 'Bank'. Suggestions of that part aren't being suggested, but this issue only occurs with the empty parent.

image

image

Wiki or enhanced README

Hey,
this repo seems to be a nice framework.
Could you provide the concept or some general usage examples?

Greetings
Paul

Replace text with adventure

The library used by the project for message components has had a major api update and a project rename (text -> adventure).
As adventure has become the de facto standard in minecraft development, switching to the new version would increase compatibility and usability by a lot. (Paper and Velocity for example, both use adventure natively).

Add tab-completion for Flags and Switches

Tab-Completion for Flags and Switches are a useful feature for advanced commands, but are still left out quite often because of implementation difficulties.

Suggestions should switch to flags/switches as soon as the user types the '-' symbol. All the available flag/switch names should be listed then. When a flag is chosen, the completion should switch be handled by the Part again. If it's a switch, it should just switch back to normal completion.

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.