- The aim of this project is to create an open source plugin of which you can either commit your requesteed changes/improvements or create a new fork and create your own plugin. Just reference this project in your fork to credit the work from here.
- Class based command creation
- BoostedYaml for Yaml processing
- Creating clans, creating individual clan config files for easy editing,
- TODO: saving all clan files, save individual clan file changes, maybe function to update specific section?
- Ensure you have branched off from the master branch using:
git checkout -b branchnameand ensure that all your changes are being pushed to this branch to open up a pull request. - To begin adding a new command, add the command to the plugin.yml located in:
src/main/resources. Following the same format as either /clan or /helloworld - Then create a new file following the format:
CommandnameCmd.javawhich extends the classGenericCmd. - Within this file, add a constructor (See HelloWorld.java example) and update the command name, description and usage here.
- Add an @Override for: boolean onCommand event, and begin coding your command here.
- Inside the constructor in:
src/main/java/cc/yllo/events/OnCommand.javaadd your command to the list 'cmds', as this is where cmds are loaded from. Without this, your command will fail.
- All arguments are completely optional. You do not need any arguments to work with this.
- First arguments are referenced as GenericTopic.
- Second arguments are referenced as GenericPost.
- Additional arguments are handled by the GenericPost.
- For example: /clan
topic:kickpost:playernamepost:args[2]
- Please use this guide, to create a command with only one argument such as: /clan disband. See below for creating additional args.
- Please have created a command, before completing the steps below for full understanding of how the system works.
- Inside the folder: /topics/ create a Java file for your topic.
- Extend :
GenericTopicand create constructor for this class, edit the variable:argto match your argument name. - Add an @Override for: boolean executeArgument, and provide the code to execute your argument here. See topics/HelloWorld.java for reference.
- In your created command class, within your constructor, add your 'Topic' class to the argsList extended from the GenericCmd class. ``argsList.add(new ClassCmd())```
- Done. You should be able to use your command, and this one argument successfully.
- Ensure you've read the above steps on setting up your first argument, then proceed.
- Within the folder:
/topics/posts/create a class for your Post arg. - Remember, this file will be the file processing any additional arguments, player name, ect...
- Extend:
GenericPost, create your constructor, edit the title (& optionally the body) strings. The title here is used as the args[1]. - Add an @Overrid method for: boolean executePost
- In your first Topic argument, under the constructor, add your created Post class to the post list.
- Please ensure you:
- pulled master branch before working,
- have ran
git checkout -b branchnameto checkout a new branch, to create a pull request. - have left a detailed git commit message
- ensured that only the files that are changed are uploaded.