Commit Graph

416 Commits

Author SHA1 Message Date
Tastybento
4fc33cb9f7 Mid-work. 2017-12-27 13:59:27 -08:00
Tastybento
b1f798ae5b Comment fix. 2017-12-27 13:52:52 -08:00
Tastybento
2825f9535e Command API and Help done.
Commands now require a setup to define their permission, player/console
status, description and any parameters they have. This is also where any
subcommands are created if they exist.

Each command automatically has a help subcommand. This is used to
display help. This will also recursively go to any other sub commands
and get help from them. 

Note that getUsage() now *only* shows the command and any sub commands.
It turns out that Bukkit requires this to start with a / because it
actually uses this in its own help system and the server will not start
if it is not in the right format. Therefore I split off parameters into
their own string. This also enables them to be translatable. 

Everything should work at this point. It's just waiting on the locale
system to work to display the strings in the locale files.
2017-12-27 12:09:08 -08:00
Florian CUNY
bdbe271a83 Removed #sendSubtitle() and #sendTitle() from NMSAbstraction
because Spigot 1.12 supports it with Player :D
2017-12-26 21:10:39 +01:00
Tastybento
f22065fd2c Fixed help and usage descriptions.
Known issue - the help shown when doing a parent help is not using the
child's custom help class for usage/description.
2017-12-26 11:09:00 -08:00
Tastybento
239cf50709 Switched to a getter for getPlugin() in CompositeCommand
Made internal variable protected.
2017-12-26 08:40:28 -08:00
Tastybento
97722b56d5 Switched plugin to bsb to avoid confusion with other plugins. 2017-12-24 10:35:36 -08:00
Tastybento
f5464347c6 rename comments. 2017-12-24 10:27:03 -08:00
Tastybento
866ac2f776 rename - list -> args 2017-12-24 10:26:41 -08:00
Tastybento
2effa48c8f Made Test class cleaner. 2017-12-24 10:12:04 -08:00
Tastybento
a198c1a44a Renamed some classes to BSB... 2017-12-24 09:51:41 -08:00
Tastybento
4f0eadeea9 Removed unused imports. 2017-12-24 09:16:27 -08:00
Florian CUNY
8144f80cfb Updated en_US with all the commands and made some minor changes to the CommandsAPI
Renamed BSBCommand to BSCommand
Renamed some commands
Put invites commands in team
Splited makeleader from promote -> setowner
2017-12-24 16:52:10 +01:00
Tastybento
5a5aff32c0 Removed unused import. 2017-12-23 22:02:15 -08:00
Tastybento
9b5a7c887c Made parent Optional in CompositeCommand to avoid null checks. 2017-12-23 21:58:32 -08:00
Tastybento
00b71c6090 Added comments. 2017-12-23 21:45:49 -08:00
Tastybento
f8ac04a779 Implemented the auto command help.
The help command is a default subcommand of every command. It will
display the usage info for the command and any subcommands.
2017-12-23 21:35:10 -08:00
Tastybento
eeb4e2a9ee Lots of work done on the command API.
Sub commands work, tab complete works. See the TestIslandCommand.java
test command for how to use the API and unit tests.

Still need to do the auto-help.
2017-12-23 19:14:35 -08:00
Tastybento
c5262e8faa Commands API implemented. Still a WIP.
Commands work and tab complete works somewhat. 
Help still needs to be done. Added in NotSetup And PluginConfig to just
make the plugin work. It's fine to remove them when there is a working
alternative.
2017-12-22 17:26:05 -08:00
Florian CUNY
bd3427fffe L10nAPI - Finished the two #get(..., reference) methods 2017-12-22 21:17:24 +01:00
Florian CUNY
4209791557 Updated locales, especially en_US 2017-12-22 14:25:22 +01:00
Florian CUNY
a3db6e9b5d AddonsAPI - Made overriden BSModule methods final, so they cannot be over-overriden 2017-12-22 13:39:00 +01:00
Florian CUNY
1c3b3a2c56 AddonsAPI - Added #getFolder() in BSModule 2017-12-22 13:37:28 +01:00
Florian CUNY
6178b768bb L10nAPI - Fixed compilation errors by...
...
- Removing NetherPortals listener
- Adding a #getTranslation(reference, ...variables) in User
2017-12-22 13:31:27 +01:00
Florian CUNY
4734f79ba1 Removed LanguagePanel - it was an example
it should be implemented as an addon
2017-12-22 13:23:04 +01:00
Florian CUNY
29dfc313fc L10nAPI - Reworking API - WIP
Removed the old localization system
Started implementation of the new one

For build reasons, removed protection listeners - they were requiring too much work to update them, and they need to be reworked due to the boilerplate code.
2017-12-22 13:22:33 +01:00
Florian CUNY
2f4136cef4 CommandsAPI - Renamed back AbstractTeamCommand to AbstractIslandTeamCommand 2017-12-22 13:20:18 +01:00
Florian CUNY
355441d7ab Renamed locale files 2017-12-22 13:19:23 +01:00
Tastybento
b3e4eeebc2 Fixed main command setup.
Added comments.
2017-12-21 23:16:43 -08:00
Tastybento
c2e37ad2ae Fixed permission check. 2017-12-21 23:13:22 -08:00
Tastybento
f28936948a Reworked command API
Implemented a recursive composite command that can be extended with
subcommands to infinity (and beyond!).

Composite command also tries to create help text and a list of help
commands. These are not current used and need more work.

This has not been tested yet completely.
2017-12-21 23:03:39 -08:00
Tastybento
18ad604b7b Changed TeamEvent to fire off class-specific events. 2017-12-17 12:38:52 -08:00
Florian CUNY
ed6899c989 CommandsAPI - command now asks if the sender is a player (option) and if it has the right permission (option)
Added some methods in User class
CommandsAPI is still WIP
2017-12-17 11:02:49 +01:00
Florian CUNY
cd40405c30
Implemented User class
And also made use of it in commands
2017-12-17 10:26:25 +01:00
Tastybento
90f88b4425 Fully removed Vault
Added commands for /island.
2017-12-16 09:33:24 -08:00
Florian CUNY
4fcd6174ad Removed Vault dependency 2017-12-16 18:29:12 +01:00
Florian CUNY
8c7bfe29bf Deleted MongoDB and SQLite (will not be implemented soon) 2017-12-16 16:51:14 +01:00
Florian CUNY
fe07c8ef45 No longer using Vault for perms, only economy 2017-12-16 16:07:00 +01:00
Florian CUNY
83e35523b7 Removed useless #isOnePointEight() in Util 2017-12-16 15:29:39 +01:00
Florian CUNY
c9e22d5849 Refactoring configuration
Removed current config "API"
Removed a few unused or duplicate settings
Removed OfflineHistoryMessages
Removed visitor blocked commands (should be an addon)
2017-12-16 15:29:17 +01:00
Florian CUNY
1d13e964aa Renamed some commands class & removed IslandTeleportCommand 2017-12-14 20:55:31 +01:00
Tastybento
a429513869 Added comment. 2017-12-14 08:36:32 -08:00
Tastybento
fd8c48bbd6 Move. 2017-12-14 08:18:33 -08:00
Tastybento
461585aebd Implemented team commands. 2017-12-14 08:18:04 -08:00
Tastybento
c6e885a8de Added abstract class to handle the invite map. 2017-12-13 23:31:14 -08:00
Tastybento
4b9762fb81 Added a number of Island commands.
Note that the team invite/uninvite are not linked yet.
2017-12-13 18:35:39 -08:00
Tastybento
539c48cc85 Added about command. 2017-12-13 17:27:04 -08:00
Florian CUNY
ca17cd1080 AddonsAPI - Documented AddonState & added ERROR state 2017-12-12 14:42:04 +01:00
Florian CUNY
7cb978fd4c CommandsAPI - Improved #getCommand(String label) in CommandsManager 2017-12-12 14:15:15 +01:00
Florian CUNY
40b56843e7 AddonsAPI - Added #isAddon() in BSModule 2017-12-12 14:14:38 +01:00