1.0.8latestEvents updateAug 29, 2024 - Create global events, event that are added by default to all created commands - onFinalized, event that is triggered when command is gettting finalized1.0.2https://github.com/jwdeveloper/CommandsFrameworkAug 27, 2024 - Improve templates - Fix having primitive types are method parameters in templates - Fix issue where command arguments where not - Fix services for Singleton to Transient inside binding service1.0.1Annotations updateAug 25, 2024 In this update I included commands registration with annotation. This is the most simple way of creating new commands Code (Java): public class ExampleCommand { @FCommand (pattern = "/hello <name:Text> <points:Number> <job:Text[Miner,Warrior,Fisherman]>", onBuilder = "onBuild", onValidation = "onValidation", onError = "onError" ) public void helloCommand (Player player, String name, double points, String job ) { player. sendMessage (ChatColor. DARK_GREEN + "Name: " + name + " points: " + points + " job" + job ) ; int i = 0 ; i = i / 0 ; //Forcing exception } public void onBuild (CommandBuilder builder ) { //Modifying commands properties before it is registered builder. argument ( "name" ). withDefaultValue ( "john" ) ; } public boolean onValidation (CommandValidationEvent event ) { event. sender ( ). sendMessage (ChatColor. YELLOW + "Validating command: " + event. args ( ). length ) ; return true ; } public void onError (CommandErrorEvent event ) { event. sender ( ). sendMessage (ChatColor. RED + "Handled exception: " + event. exception ( ). getCause ( ). getMessage ( ) ) ; } } public final class ExamplePlugin extends JavaPlugin { @Override public void onEnable ( ) { ExampleCommand exampleCommand = new ExampleCommand ( ) ; Commands commands = CommandsFramework. enable ( this ) ; commands. create (exampleCommand ). register ( ) ; } }2024-08-19Aug 19, 2024
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta