Commit Graph

995 Commits

Author SHA1 Message Date
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
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
8b821e9f47 Fixed paramters -> parameters in en-US locale 2018-10-27 15:43:36 +02:00
Florian CUNY
3df4d4be30 Updated default config.yml 2018-10-25 10:30:27 +02:00
Florian CUNY
ec2793e6f8 Made IslandSethomeCommand a ConfirmableCommand
#237

It adds a bunch of WorldSettings and updates the en-US locale as well!
2018-10-25 09:43:36 +02:00
Florian CUNY
09ce51259d Fixed a mistake in IWM javadoc 2018-10-25 09:42:50 +02:00
Florian CUNY
5391544e9c Fixed "island.maxhomes" permission not being appended with the addon's permission prefix
This may help for #256.
2018-10-20 11:45:41 +02:00
Florian CUNY
95bfab916e Replaced Util#getPermValue(Player, String, int) with User#getPermissionValue(String, int) 2018-10-20 11:32:42 +02:00
Florian CUNY
3102195156 Fixed a bunch of code smells (again) 2018-10-20 10:59:19 +02:00
Florian CUNY
85ea4af1ad Readded User#spawnParticle(Particle, Particle.DustOptions, int, int, int) 2018-10-20 10:37:31 +02:00
Florian CUNY
7248fb3e14 Fixed some code smells 2018-10-14 10:09:04 +02:00
Florian CUNY
cae214f856 Added schem clipboard selection display using particles 2018-10-14 09:51:49 +02:00
Florian CUNY
3d763bddad Made User#spawnParticle use double instead of int 2018-10-14 09:50:15 +02:00
Florian CUNY
98487512f9 Fixed typo in AdminRangeDisplayCommand 2018-10-14 09:49:45 +02:00
Florian CUNY
42ffe34796
Rewrote schem main command parameters
#305
2018-10-14 08:12:30 +02:00
Florian CUNY
711db68448
Merge pull request #304 from BentoBoxWorld/why
Why admin command
2018-10-14 07:35:14 +02:00
tastybento
ebeaa650d9 Adds the addon name to the world list for version.
https://github.com/BentoBoxWorld/bentobox/issues/285
2018-10-14 12:22:27 +09:00
tastybento
8cc2d1678a Added English locale text for schem commands.
https://github.com/BentoBoxWorld/bentobox/issues/305
2018-10-14 11:46:30 +09:00
tastybento
7bd86c30b5 Fixed bugs and tests. 2018-10-12 16:42:15 -07:00
tastybento
e89cdb8d6a WIP: Added admin why command. 2018-10-12 16:19:21 -07:00
tastybento
0020cbf849 WIP: Tracks why flag actions allowed or not
This idea is to add a "why" command for admins that will reveal why a
player can do something. I want admins to be able to understand this
better so that they can give us better bug reports or fix it themselves.

We have good error messages for players for when they can do something
via the Island Protected text, but it would be useful to have the
opposite too, i.e., an explanation for why a player was able to break
blocks.

The approach here is that an admin would do "/bsbadmin why <playername>"
to turn on tracking. Then when the player did something, it would be
reported in the console.

This commit just has enums set, but I'm going to work on a notification
system next.
2018-10-12 08:14:08 -07:00
tastybento
84a79fe1de Fixed and added tests for new deathCount option
Fixes test failures from commit a6d25d68a9

I added some more tests to check for in world as well as death count
being on/off.
2018-10-07 18:28:48 -07:00
tastybento
14b7a3aa82 Fixed teleporting to an island by using a member's name
https://github.com/BentoBoxWorld/bentobox/issues/300
2018-10-07 18:15:18 -07:00
Florian CUNY
a6d25d68a9
Only count death if it is enabled for this world
#164
2018-10-07 10:35:15 +02:00
Florian CUNY
87c54aaf08
Added #isDeathsCounted() in WorldSettings
#164
2018-10-07 10:24:22 +02:00
tastybento
7515b39583 Shows plugin version in version command.
https://github.com/BentoBoxWorld/bentobox/issues/285
2018-10-05 17:57:11 -07:00
tastybento
b83e5d4a56 Fixed tests for Invincible visitors. 2018-10-05 17:34:21 -07:00
tastybento
5039980693 Fix to avoid null colors
https://github.com/BentoBoxWorld/bentobox/issues/293
2018-10-05 17:19:51 -07:00
tastybento
a49739d45a Fix for dying in the void in non-island location causes spectator mode.
https://github.com/BentoBoxWorld/bentobox/issues/286
2018-10-05 17:18:18 -07:00
tastybento
0f5ab8ab7d Added inWorld(World.class) to IWM
This had a ripple affect through the tests because now there are two
inWorld() methods - one for Location and one for World.
2018-09-29 09:01:20 -07:00
Florian CUNY
f110aedc69 Few fixes to AddonClassLoader
Related to #280

Added handling for NoClassDefFoundError
"Grammatically" fixed a few exception messages
2018-09-29 15:01:45 +02:00
tastybento
2df049f70d Implements protection for standard Nether and End
This was missing so it needed to be added.

Related to: https://github.com/BentoBoxWorld/addon-bskyblock/issues/9
2018-09-25 22:20:30 -07:00
tastybento
1f1b446137 Fixed standard Nether portal use 2018-09-25 21:20:09 -07:00
tastybento
86d40ca126 Fixed issue where standard Nether is protected.
Also applies to standard End.

https://github.com/BentoBoxWorld/addon-bskyblock/issues/9
2018-09-25 20:45:43 -07:00
tastybento
0f371f4800 Removed unneeded imports and code. 2018-09-25 20:05:23 -07:00
Florian CUNY
3d924c9ffc
Merge pull request #260 from BentoBoxWorld/schem-command-improvements
Schem command improvements
2018-09-23 22:58:10 +02:00
Florian CUNY
58de346dc9 Various changes to SafeSpotTeleport
* Replaced SafeTeleportBuilder by SafeSpotTeleport.Builder
* Added "overrideGamemode" parameter
* AdminTeleportCommand no longer overrides the player's gamemode when teleporting (fixes #262 )
2018-09-15 12:38:51 +02:00
Florian CUNY
5db4866cb6 Moved HeadGetter and HeadRequester to util/heads package 2018-09-15 12:17:58 +02:00
Florian CUNY
1f93a7f085 Moved YmlCommentParser and YmlConfiguration to util/yaml package 2018-09-15 12:17:27 +02:00
Florian CUNY
edd64d2f30 Moved AddonState in Addon.State 2018-09-15 12:11:23 +02:00
Florian CUNY
2eb46b0c2c Fixed some code smells 2018-09-15 11:37:56 +02:00
Florian CUNY
102ad864e1 Simplified condition in IslandCreateEvent 2018-09-15 10:44:04 +02:00
Florian CUNY
02be048192 Removed "general.errors.unknown-player-name" : added a "[name]" textvariable in "general.errors.unknown-player"
Closes #263
2018-09-15 10:39:16 +02:00
tastybento
d744b58638 Fixed tests
Created two new tests:

1. A test that closing inventory does not happen unless it is a known
panel.
2. A test that verifies known panels are closed.
2018-09-08 10:35:40 -07:00
Florian CUNY
918f6de782 Fixed clicking outside of inventory closing it
I edited it so it only happens on BentoBox's panels. Having it closing "every" inventory was causing issues with vanilla inventories (crafting table, etc...)

I could not fix the related tests though : PanelListenerManagerTest#testOnInventoryClickOutside (PanelListenerManagerTest.java:128) is failing every time.
2018-09-08 17:12:15 +02:00
Florian CUNY
cf11c1b9c1 Use ConfirmableCommand#askConfirmation(User, String, Runnable) in AdminSchemSaveCommand 2018-09-03 15:55:00 +02:00
Florian CUNY
a7d001d578 Added User#spawnParticle(Particle, Particle.DustOptions, int, int, int) 2018-09-03 15:53:16 +02:00
Florian CUNY
1c24619450 Merge remote-tracking branch 'origin/develop' into schem-command-improvements 2018-09-03 15:42:57 +02:00
Florian CUNY
cc6aaa1fd1
Merge pull request #261 from BentoBoxWorld/pvp-notify
Use User#notify() instead of #sendMessage() in PVPListener
2018-09-03 10:16:29 +02:00
tastybento
505624b45c Fixes tests. Also fixes a bug.
https://github.com/BentoBoxWorld/bentobox/issues/258
2018-09-02 20:45:31 -07:00
Florian CUNY
c039b9e13c
Merge pull request #259 from BentoBoxWorld/fix-unknown
Fixed players considered "unknown" until they create an island
2018-09-02 21:39:29 +02:00
Florian CUNY
ee9c7937ea Use User#notify() instead of #sendMessage() in PVPListener 2018-09-02 17:25:15 +02:00
Florian CUNY
fbf88483f0 Added trust and coop cooldown in config instead of using the invite cooldown for /is team coop and /is team trust 2018-09-02 15:06:46 +02:00
Florian CUNY
e5cc56b919 Added #askConfirmation(User, String, Runnable) in ConfirmableCommand
This can allow the command to give a bit more context about the confirmation request.
ConfirmableCommand#askConfirmation(User, Runnable) can still be used.
2018-09-02 11:55:26 +02:00
Florian CUNY
e380860b23 Splited AdminSchemCommand in various sub commands
Locale needs to be updated.
2018-09-02 11:13:58 +02:00
Florian CUNY
ffe1363c48 Fixed typo in SchemsManager 2018-09-02 11:10:20 +02:00
Florian CUNY
97222808ac Fixed players considered "unknown" until they create an island 2018-09-02 08:50:40 +02:00
Florian CUNY
5ad363ca11 Fixed weird header display in Settings Panel 2018-09-01 17:38:54 +02:00
Florian CUNY
d05582fd79 Fixed Panels size that could be higher than 54 2018-09-01 17:38:36 +02:00
Florian CUNY
8e7843de82 Made Notifier.Notification private
External plugins/addons shouldn't have had access to this inner class.
2018-09-01 14:30:25 +02:00
Florian CUNY
678e699f1d Fixed Enter/Exit messages spam introduced in 343a789d95
Fixes #253
2018-09-01 14:29:45 +02:00
Florian CUNY
a12eec7a6b Fixed Invincible Visitors unit testing 2018-08-31 21:12:44 +02:00
Florian CUNY
279dc6fbd8 Fixed weird stained glass pane display in SettingsPanel 2018-08-31 21:09:01 +02:00
Florian CUNY
ea1fea66ff Fixed Invincible Visitors still using "general.errors.you-need". 2018-08-31 21:06:18 +02:00
Florian CUNY
63e004415b Fixed Flag.Type.WORLD_SETTING to use GRASS_BLOCK instead of GRASS 2018-08-31 21:04:24 +02:00
Florian CUNY
343a789d95 Fixed Enter/Exit messages not being sent when the player teleports to the island 2018-08-31 20:58:47 +02:00
Florian CUNY
4b9e8f1e0e Fixed NPE when an invite gets rejected 2018-08-31 20:46:53 +02:00
Florian CUNY
07547472b8
Fixed color general.errors.no-permission in en-US 2018-08-31 20:17:41 +02:00
Florian CUNY
b2c1102b9f
Merge pull request #250 from BentoBoxWorld/java10
Java 10 Compatibility
2018-08-31 20:01:46 +02:00
tastybento
4c3ddc8079 Put back in JavaDoc and Shade Plugin 2018-08-31 07:51:31 -07:00
tastybento
10db4230b0 Fixes compatibility issues with Java 10
Use non-deprecated methods still compatible with Java 8. These mostly
just propagate Exceptions up when instantiating constructors when using
the database functions.

Reverted POM back to Java 8 so that compiled code will work on Java 8 as
well.
2018-08-31 07:44:47 -07:00
Florian CUNY
24d783be24 Cleanup in Settings
Removed purge-related settings.
Renamed all database-related settings and methods to replace `db` with `database`.
Moved confirmationTime to `island.confirmation.time`.
Renamed inviteWait, banWait and resetWait to inviteCooldown, banCooldown, resetCooldown. Also moved them under `island.cooldown.x`.
Removed kickWait and leaveWait, using confirmationTime instead.
Moved `island.require-confirmation.<command>` to `island.confirmation.commands.<command>`.
Updated tests.
Updated getters and setters using code automation. Sadly, this wiped out all the Javadoc.
2018-08-31 11:06:37 +02:00
tastybento
95f8c81963 Switched to Java 10
Maven shade plugin and javadoc plugins have issues with Java 10 so those
are currently commented out.

BStats cannot work because shade plugin is not shading.

Shade plugin is fixed in snapshots, but not in Maven Central yet.
2018-08-30 21:44:56 -07:00
tastybento
4203ce85b4 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git into develop 2018-08-31 10:49:56 +09:00
tastybento
4eadd259f7 Added PanelBuilderTest and fixed bug in PanelBuilder
nextSlot() was not giving next slot after an assigned slot.

11600ft and descending into SFO. 14 miles out.
2018-08-31 07:28:02 +09:00
Florian CUNY
1dfb46a2cd Changed island range particles to be gray redstone instead of TOWN_AURA 2018-08-30 23:54:44 +02:00
Florian CUNY
9b9031a009 Load Metrics only if it is set to true in config 2018-08-30 23:34:13 +02:00
Florian CUNY
3c00247eda Removed "general.check-updates" from config. Unused. 2018-08-30 23:33:52 +02:00
Florian CUNY
1e791f8497 Fix last login timestamp in Island#showInfo() being 0 due to how OfflinePlayer#getLastPlayed() works. 2018-08-30 23:28:50 +02:00