A flexible command framework which removes lots of boilerplate code used in commands
Check the documentation for installation and usage information for this project
A flexible and platform-agnostic command framework for Java 8+
Home Page: https://unnamed.team/docs/command-flow
License: MIT License
A flexible command framework which removes lots of boilerplate code used in commands
Check the documentation for installation and usage information for this project
(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.
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.
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)
commandflow-discord
currently uses messages to detect commands. We should use Application Commands instead since it's a more user-friendly and native way to create bot commands.
Also, bots can't read message contents without a privileged intent
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.
Maybe for 1.0.0
?
Hey,
this repo seems to be a nice framework.
Could you provide the concept or some general usage examples?
Greetings
Paul
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).
Every time i try to load a plugin that uses text-api,
CommandFlow throws a IllegalAccessError:
but it disappears if i remove any of the conflicting plugins.
Translator#setConverterFunction
takes a Function<String, TextComponent>
as parameter, I think it should be Function<String, Component>
.
The DefaultTranslator
also ignores it being a TextComponent
:
/* 77 */ Component newComponent = stringToComponent.apply(trans);
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.