ravenlab / commander Goto Github PK
View Code? Open in Web Editor NEWA platform agnostic Minecraft command framework
License: MIT License
A platform agnostic Minecraft command framework
License: MIT License
Have annotations per property I.E: Command, Permission, PermissionMessage etc
Children should inherit their parent's permission message if explicitly defined.
Default tab complete for legacy server and brigadier support for 1.13+ servers.
This would be good for future compatability. This may be able to be accomplished by using bytebuddy or something similar. Mockito also has spies which may work https://github.com/mockito/mockito/wiki/Using-Spies-%28and-Fakes%29
Started in a773cc2
Refactor registerAlias()
to the Commander class. Each platform commander should provide the registered aliases. This data then can be used in the Commander class to then handle registering there.
Blocked by #17
Add command usage field if a command does not execute it should return the usage back to the user if they have permission to do so.
Make an interface for commanders so that a listener can be added for when a plugin is disabled so that commands can be automatically unregistered.
Currently can't mock the bukkit server due to needing to access fields via reflection. Mockito should be investigated further and if mockito doesn't have something for this then we might need to make something for it.
Commands should be able to be configured via code. This will be useful so that if a user wants to make command usage, permissions etc a plugin could implement it.
The wrapper classes should be refactored into the carwash project. This was needed originally for DynamicGui but it was never done. This should be done for future projects to ensure a central code base.
This section may be performance heavy, this should probably be optimized in some way. Caching (possibly with a graph) may be useful. Reference code https://github.com/ravenlab/commander/blob/master/src/main/java/com/github/ravenlab/commander/command/parser/CommandParser.java#L9-L21
The current test harness has a lot of overlap when implementing new platforms. These tests should probably be abstracted in some way, maybe junit runners? Some code won't be able to be abstracted such as testing internal components.
Gradle needs to be updated
If not defined
CommandMap map;
Command original = map.get("test");
if(original != null) {
map.put("test", new Command() {
public void command(sender, command, label, args) {
if(args.length == 0) {
//execute registered command
} else {
original.command(sender, command, label, args);
}
}
});
} else {
//Just register regular command
}
If a command is wrapped on unregister it should unwrap.
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.