Commit Graph

1097 Commits

Author SHA1 Message Date
tastybento
a6357ed157 Uses default enum values if invalid one used in a config. 2018-10-31 00:07:41 -07:00
tastybento
935704d7dd Added safety checking to config.yml
If there is an enum setting, e.g. FLATFILE instead of YAML in a config,
the config will not load and the resulting object will be null. This
adds a check to the main config.yml load and disables the plugin if
there is a problem.
2018-10-30 15:16:13 -07:00
tastybento
49fa079f13 WIP fix for comment version number 2018-10-30 14:30:07 -07:00
tastybento
d9783c8d73 Fix for issue where team members are sometimes not recognized.
https://github.com/BentoBoxWorld/bentobox/issues/318
2018-10-30 13:21:27 -07:00
Florian CUNY
0346ea8a23 Added resetting money when joining/leaving island (untested) 2018-10-30 18:22:26 +01:00
Florian CUNY
b1320906b0 Update default config.yml 2018-10-30 17:59:11 +01:00
Florian CUNY
538a34b0bd Added support for the "experimental" tag from ConfigEntry
Watch out ! "/!\ This feature is experimental and might not work as expected or might not work at all."
2018-10-30 17:58:50 +01:00
Florian CUNY
86b1d09653 Settings: renamed ""island.customranks" to "island.custom-ranks" and made it experimental 2018-10-30 17:56:28 +01:00
Florian CUNY
0c75e556b2 Implemented Vault support 🎉 2018-10-30 15:35:27 +01:00
Florian CUNY
c236e1a3bc Added Hook#getFailureCause() and fixed NPE in HooksManager 2018-10-30 15:33:16 +01:00
Florian CUNY
8fe4b16805 Finished Hooks API 2018-10-30 14:53:19 +01:00
Florian CUNY
66bbed48c6 Removed AddonInterface (useless) and moved methods to Addon 2018-10-30 09:27:59 +01:00
Florian CUNY
b9a86fd899 Made Hook an abstract class rather than an interface 2018-10-30 09:24:36 +01:00
Florian CUNY
493a525775 Fixed JSONDatabaseHandler to avoid memory leak
Thanks Sonarcloud ^^
2018-10-29 21:39:48 +01:00
Florian CUNY
2dd8fcb13c Avoid catching Error (dangerous behaviour) 2018-10-29 21:29:43 +01:00
Florian CUNY
5cdfe690f4 Implemented basic Hooks API
WIP
2018-10-29 21:29:07 +01:00
Florian CUNY
5b97d16a2d Made each DatabaseConnectors's constructors package-private 2018-10-29 20:55:18 +01:00
Florian CUNY
bf506a49b2 Fixed some code smells 2018-10-28 17:15:13 +01:00
Florian CUNY
37cb96f586 Fixed [label] text variable being replaced by "invite" in the invite notification
Fixes #315
2018-10-28 17:03:42 +01:00
Florian CUNY
7b2478cf33 Updated databaseType config comment 2018-10-28 16:51:51 +01:00
Florian CUNY
e8ba1805a5 Renamed FLATFILE databasetype to YAML 2018-10-28 16:51:38 +01:00
Florian CUNY
db5ac2d0e5 Added JSON (flatfile) database type 2018-10-28 16:34:43 +01:00
Florian CUNY
10000b71f6 Little optimization for AbstractJSONDatabaseHandler#getGson() 2018-10-28 16:02:54 +01:00
Florian CUNY
4f5009fe0e Moved DATABASE_FOLDER_NAME in AbstractDatabaseHandler 2018-10-28 16:02:23 +01:00
Florian CUNY
04e4f9a4aa Moved TypeAdapters and AbstractJSONDatabaseHandler in database/json package 2018-10-28 15:38:57 +01:00
Florian CUNY
dcba17f569 Made all DatabaseHandlers' constructors package-private 2018-10-28 15:34:02 +01:00
Florian CUNY
77258b2770 Added AbstractJSONDatabaseHandler<T> 2018-10-28 15:28:43 +01:00
Florian CUNY
f0c4cb710c Removed DatabaseConnector#loadYamlFile and DatabaseConnector#saveYamlFile
It was only used by FlatFileDatabaseHandler and therefore was useless for other DatabaseHandlers
2018-10-28 15:01:17 +01:00
Florian CUNY
0dc9de9c37 Fixed broken file renaming
Well... Hopefully it'll fix it
2018-10-28 14:33:36 +01:00
Florian CUNY
49c7d6b646 Renamed MONGO -> MONGODB in DatabaseType 2018-10-28 14:15:29 +01:00
Florian CUNY
2f7b8a6764 Simplified AddonsManager#sortAddons() 2018-10-28 14:09:35 +01:00
Florian CUNY
12d1909a22 Bunch of fixes to the AddonsManager
Renamed loader list to loaders.
Removed #loadAddonsFromFile().
Fixed the error handling when enabling an addon.
Fixed #disableAddons() disabling not-enabled addons.
Renamed #setLoader() into #setLoaders()
2018-10-28 13:42:13 +01:00
Florian CUNY
b87416d030 Removed YmlConfiguration and YmlCommentParser as they weren't used 2018-10-28 11:43:55 +01:00
Florian CUNY
b4e3079cf9 Removed unused imports in Util 2018-10-28 11:36:47 +01:00
Florian CUNY
3e34b4d11d Added a bit more logging in AddonsManager 2018-10-28 11:36:36 +01:00
Florian CUNY
6dd02a15b7 Made use of Addon.State
Fixes #281
Replaced Addon#setEnabled(boolean) with Addon#setState(Addon.State).

Now, if an exception gets thrown while enabling an addon, it'll automatically stop enabling it and set its state to "INCOMPATIBLE" or "ERROR". These values could later be get to be displayed in the version command.
2018-10-28 11:12:00 +01:00
Florian CUNY
e930510243 Renamed TestBSkyBlock to TestBentoBox 2018-10-28 10:34:22 +01:00
Florian CUNY
75e5d29934 Replaced IslandTeamSetownerCommand label to "setowner" instead of "setleader" 2018-10-28 10:28:23 +01:00
Florian CUNY
89700c82cc Renamed TeamEvent.TeamSetOwnerEvent to TeamEvent.TeamSetownerEvent 2018-10-28 10:27:22 +01:00
Florian CUNY
14a794a5b1 Lowercased some command class names to better fit how they are actually working in game 2018-10-28 10:27:01 +01:00
Florian CUNY
14a3ed6792 Renamed TeamEvent.TeamMakeLeaderEvent to TeamEvent.TeamSetOwnerEvent 2018-10-28 10:19:55 +01:00
Florian CUNY
13c483e5eb Renamed AdminTeamMakeLeaderCommand to AdminTeamSetOwnerCommand 2018-10-28 10:19:14 +01:00
Florian CUNY
cc2bbfc447 Updated version to 0.12.0-SNAPSHOT due to upcoming breaking changes 2018-10-28 10:18:27 +01:00
Florian CUNY
20b6c4a7cb Fixed tests and commands relying on previously broken API
Mistakenly pushed the previous changes on develop before committing these fixes.
2018-10-27 16:52:07 +02:00
Florian CUNY
a071f97538 Fixed island protection range not being updated after a login
Fixes #256.
2018-10-27 16:47:55 +02:00
Florian CUNY
f27b8aa003 More Javadoc fixes in IslandsManager & use the new Addon#getPermissionPrefix 2018-10-27 16:43:17 +02:00
Florian CUNY
b6230f2bdf ⚠️ removed CompositeCommand#setPermissionPrefix(String)
The permissionPrefix is now inherited from the addon's.
2018-10-27 16:42:29 +02:00
Florian CUNY
d9a15ceedd Added Addon#getPermissionPrefix 2018-10-27 16:41:24 +02:00
Florian CUNY
b286bb3296 ⚠️ Various changes to IslandsManager
Fixed some Javadoc.
Renamed #getCount() to #getIslandCount().
Renamed #makeLeader() methods to #setOwner().
Removed the permPrefix parameter from #setOwner() methods.
2018-10-27 16:32:06 +02:00
Florian CUNY
9427d3dd46 Version updated to 0.11.1-SNAPSHOT due to upcoming bug fixes 2018-10-27 15:48:34 +02:00