Commit Graph

1558 Commits

Author SHA1 Message Date
tastybento
9ba34d1e92 Skip synthetic fields from Jacoco or compiler
When using introspection, synthetic fields should be skipped. These
fields can be added by Jacoco or even the compiler so will cause
problems during unit testing.

Refactored YamlDatabaseHandler to be easier to understand.
2019-03-08 22:29:28 -08:00
BONNe
d11a27dc6d Fixed MILKING flag not protecting milking Mooshrooms (#602)
Add extra PlayerInteractEntityEvent handling that prevents from using bowl on mooshrooms without MILKING protection flag.
2019-03-08 20:40:42 +01:00
BONNe
07b4e2d30c Fixed ArrayOutOfBoundsException in admin delete command (#600)
When admins tried to delete island, they got an ArrayOutOfBounds exception.
This will fix it.
2019-03-08 20:38:59 +01:00
tastybento
d4d1b77c24 Added test class for island team invite accept command.
Reduced complexity of command.
2019-03-07 22:57:49 -08:00
tastybento
a397945248 Reduce complexity code smell. 2019-03-07 22:05:24 -08:00
tastybento
7544660643 Reduce complexity code smell. 2019-03-07 21:59:37 -08:00
tastybento
d3be21b3ae Fixed minor code smells for db handlers. 2019-03-07 18:44:15 -08:00
tastybento
7471dd6f2e Enable Ops to adjust any island settings including spawn island
https://github.com/BentoBoxWorld/BentoBox/issues/599
2019-03-07 10:02:40 -08:00
tastybento
9318973459 Does not remove arrows or tridents if PVP is disabled.
https://github.com/BentoBoxWorld/BentoBox/issues/597
2019-03-06 22:05:26 -08:00
tastybento
9742c1f0e3 Fixes NPE when going through a non-BentoBox world portal.
https://github.com/BentoBoxWorld/BentoBox/issues/583

Caused by a failure to check that world was in the known BentoBox worlds
before calling the IWM method.
2019-03-06 21:38:15 -08:00
tastybento
f0b57a3a64 Fixes test for offline redstone listener 2019-03-06 21:28:20 -08:00
Florian CUNY
2bb4301af7 Removed unneeded dangling javadoc in newly created test classes 2019-03-04 08:38:29 +01:00
Florian CUNY
ac1128506e Added Flags#OFFLINE_GROWTH
#580
2019-03-04 08:29:43 +01:00
Florian CUNY
2ae36e737f Improved OFFLINE_REDSTONE handling (and added javadoc) 2019-03-04 08:22:18 +01:00
tastybento
c004c8e4a4 Added InventoryListener test class. 2019-03-03 22:26:52 -08:00
tastybento
326d6d033c Added BucketListener test class. 2019-03-03 21:53:43 -08:00
tastybento
e9dc678a08 Added EggListener test class. 2019-03-03 21:28:43 -08:00
tastybento
9659610b11 Added BreakBlocksListener test class.
Also added a way to trap null location checks with checkIsland in
FlagListener.
2019-03-03 21:18:38 -08:00
tastybento
ff6b754333 Adds ender crystal protection.
https://github.com/BentoBoxWorld/BentoBox/issues/589
2019-03-03 20:00:11 -08:00
tastybento
15f97927de Fixes range resetting if player does not have a range permission.
If a player's island range is set using the range set admin command, the
range was being reset when the player logged in if they had no range
permission.

https://github.com/BentoBoxWorld/BentoBox/issues/484
2019-03-03 19:23:15 -08:00
Florian CUNY
f1b24a45d3 Fixed IslandEnterEvent and IslandExitEvent not being called if Flags#ENTER_EXIT_MESSAGES was set to false 2019-03-03 17:39:58 +01:00
Florian CUNY
cdaec6c517 Removed unused import in PlaceholderAPIHook 2019-03-03 17:39:22 +01:00
Florian CUNY
c5dc7fcfad Added methods to unregister placeholders in PlaceholdersManager
#592
2019-03-03 16:29:46 +01:00
Florian CUNY
4f7de44b67 Fixed tests 2019-03-03 15:33:54 +01:00
YellowZaki
11c0331abd Players with "admin.noban" permission can't be banned (#590)
From this https://github.com/BentoBoxWorld/BSkyBlock/blob/master/src/main/resources/addon.yml#L132
2019-03-03 09:14:53 +01:00
Ranald
7c01199763 Cleaned code in IslandRespawnListener (#587)
1. Made respawn map private and final.
2. Changed value type from World to UUID. (weaker reference)
3. Removed ignoreCancelled from both listener annotations. (neither events can even be cancelled)
4. Changed program flow from "if-so-continue" to "if-not-return". (easier to follow and read)
5. Added basic comments on what each check does.
6. Removed redundant flag check. (wouldn't be in the map if it wasn't true)
7. Removed redundant Map contains, get, and then remove calls. (A simple call to remove and a null check are more efficient)
2019-03-02 22:47:52 +01:00
Florian CUNY
d34caf6546 Version 1.3.1 2019-03-01 21:14:44 +01:00
Florian CUNY
980cdb9b9f Added Flags#EXPERIENCE_BOTTLE_THROWING (splited from POTION_THROWING) 2019-03-01 21:10:27 +01:00
Florian CUNY
f422a22f02 Fixed NPE in FlagListener if provided location is null
Fixes #585
2019-03-01 20:54:50 +01:00
tastybento
98e0da6af2 Fixes UTF8 database connection issue.
https://github.com/BentoBoxWorld/BentoBox/issues/582

Adjusts JDBC connection string to specifically use unicode and UTF8.
2019-02-28 20:35:10 -08:00
Florian CUNY
bbeefc20ac
Fixed mishandling in PortalTeleportationListener
it's a very stupid mistake... Which caused the "to End" teleportation to teleport the player to the Nether...
2019-02-27 14:25:32 +01:00
tastybento
d68817863a Displays BentoBox version info alphabetically
https://github.com/BentoBoxWorld/BentoBox/issues/555
2019-02-26 09:09:12 -08:00
tastybento
2664acbe47 Adds null check for world in portal teleport listener
This should not occur, but apparently, it can sometimes.

https://github.com/BentoBoxWorld/BentoBox/issues/583
2019-02-26 08:19:05 -08:00
Florian CUNY
b5a657de52 Added Flags#LEAF_DECAY 2019-02-24 17:49:07 +01:00
Florian CUNY
7da7dd4884 Added a better "not-in-team" message for AdminTeamKickCommand
#577
2019-02-24 11:22:33 +01:00
Florian CUNY
73417fd990 Fixed AdminTeamKickCommand not working properly
#577
2019-02-24 11:11:25 +01:00
Florian CUNY
7fff4257fa Added Flags#DRAGON_EGG
#559
2019-02-23 11:03:00 +01:00
Florian CUNY
ec75133d54 Version 1.3.0 2019-02-22 11:25:39 +01:00
Florian CUNY
587e400287 Fixed code smells 2019-02-22 10:40:05 +01:00
Florian CUNY
29eb4b0486 Disabled the whole GitHub connectors thing and hid related settings 2019-02-22 10:03:04 +01:00
Florian CUNY
a916e04136 Improved '/bbox v' description
#555
2019-02-22 09:58:48 +01:00
Florian CUNY
e361d9867c Fixed PVPListenerTest 2019-02-21 22:32:58 +01:00
Florian CUNY
54aa2e61d3
Fixes IllegalArgumentException in VaultHook (#574)
* Added ability to get a User instance from an OfflinePlayer

* Made VaultHook use OfflinePlayer instead of Player

Fixes #572

* Fixed incomplete previous commit
2019-02-21 22:20:50 +01:00
tastybento
2f432e9f35 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git into develop 2019-02-21 12:43:03 -08:00
tastybento
b711f3fd6c Fixes assertion error. 2019-02-21 12:42:53 -08:00
Florian CUNY
e7b2a6ed39 Updated the config header to talk about the ability to reload config 2019-02-21 20:34:31 +01:00
Florian CUNY
29c7adec44 Marked 'general.database-type' ConfigEntry as "needsReset" 2019-02-21 20:18:05 +01:00
Florian CUNY
d91e29a2b7 Improved ConfigEntry explicative comments in config 2019-02-21 20:17:28 +01:00
tastybento
83827da448 Fixes a number of issues with spawn island setting
https://github.com/BentoBoxWorld/BentoBox/issues/523

Uses safe-spot teleport to teleport players.
The spawn point of an island was not being set by the setspawn command.
The spawn point on the spawn island can now be reset using the setspawn
command.
If the spawn point does not exist, a safe spot will be found.

Added AdminSetspawnCommand test class.
2019-02-21 10:46:29 -08:00
tastybento
8dd1ce10a9 Merge branch 'develop' of https://github.com/BentoBoxWorld/bentobox.git into develop 2019-02-21 10:42:59 -08:00
tastybento
278eb37033 Fixes bug where player will not exit SPECTATOR mode
If the proposed location was immediately safe, the player was not being
put back to the default game mode.
2019-02-21 10:41:59 -08:00
Florian CUNY
c0c2b63af6 Fixed spacing in "cannot add island to grid" error in IslandGrid 2019-02-21 18:29:41 +01:00
Florian CUNY
0d96eab394 Improved comments handling in YamlDatabaseHandler
And also added the "since" thing from ConfigEntry.
2019-02-21 18:28:23 +01:00
BONNe
54811c5dbd Fix issue with offline players that kept inventory (#564)
Fixes #521 


* Fix issue with offline players that kept inventory, after being kicked out of team. (#521)

* Update src/main/java/world/bentobox/bentobox/api/commands/island/team/IslandTeamKickCommand.java

Co-Authored-By: BONNe <bonne@bonne.id.lv>

* Update IslandTeamKickCommand.java

* Change QuarantinedWorld to PendingKicks.

Increase PlayerChangedWorldEvent event priority.
2019-02-21 16:55:09 +01:00
Florian CUNY
cdb83e576a Added a bunch more settings in config 2019-02-21 11:17:39 +01:00
Florian CUNY
1bdb919734 Added 'web.github.download-data' in config 2019-02-21 10:53:01 +01:00
Florian CUNY
e041107df9 Moved 'general.metrics' to 'web.metrics' in config 2019-02-21 10:39:06 +01:00
Florian CUNY
e115a1df4d Fixed code smells 2019-02-21 10:00:59 +01:00
tastybento
160ef002e4 Fixes island coords that are not on the grid.
https://github.com/BentoBoxWorld/BentoBox/issues/549
2019-02-20 21:42:43 -08:00
tastybento
30e3dbf269 Fixes NPE if admin register cannot get a valid island slot 2019-02-20 13:17:11 -08:00
tastybento
da464621e0 Enables negative values in numbered permissions.
https://github.com/BentoBoxWorld/BentoBox/pull/560
2019-02-20 12:33:30 -08:00
tastybento
c01bd2e784 Fix admin unregister test. Checks canExecute, not execute. 2019-02-20 11:58:08 -08:00
tastybento
f515bb6205 Fixes bug where island location was shifting due to home calculation
https://github.com/BentoBoxWorld/BentoBox/issues/549

Using the add method on the location was actually changing the
fundamental island location and shifting all subsequent islands off by
0.5 every time.
2019-02-20 11:18:42 -08:00
tastybento
212c690117 Make sure to check for correct arguments. 2019-02-20 11:03:58 -08:00
Florian CUNY
e44894a803 Added Island's UUID in Island#showInfo(User) 2019-02-20 15:38:38 +01:00
Florian CUNY
2eba3224b7 Added #tabComplete(...) in AdminInfoCommand 2019-02-20 15:21:28 +01:00
Florian CUNY
302ab0fd3a Fixed 'commands.island.team.invite.accept.confirmation' in en-US locale 2019-02-20 11:28:24 +01:00
Florian CUNY
fa1325bf14 Fixed IslandSethomeCommandTest 2019-02-20 11:20:14 +01:00
BONNe
f5bbe35bd8 Fixed members not being able to set homes (#569)
#538 
It happened because IslandManager#hasIsland(World,User) returns true only if island is owned by player, team members will always gets false, as they do not directly own an island.
2019-02-20 10:49:18 +01:00
tastybento
bce30ce83d Fix to include team members.
96dda2c96d (r32386838)
2019-02-19 23:46:53 -08:00
tastybento
96dda2c96d Fixed portal teleportation listener
The reason the test was failing was because the check on whether the
player had an island or not was not being done. I added the check back
in. So now, if a player has no island, the portal will just do nothing.
2019-02-19 23:27:11 -08:00
tastybento
e56d6715af Fixed default help command test class 2019-02-19 23:03:17 -08:00
tastybento
dfc667953f Fixed team kick test class 2019-02-19 22:49:48 -08:00
BONNe
34b2440117 Fixed owners who could not kick team members (#567)
So, UUID cannot be compared with == and !=. It should be always use UUID#equals(UUID) method.
2019-02-19 23:30:37 +01:00
BONNe
a505a3cede Hopper, Furnace and Chest Minecarts are now protected by proper flags (#565)
#550 

* Implement HopperMinecart, ChestMinecart and FurnaceMinecart protection by proper flags (#550).

* Add proper Minecart while checking player interact at entity event.
Minecraft flag should affect RidableMinecrat.
Added ExplosiveMinecart and CommandMinecart to avoid their usage, as they are not protected by other flags.

* Fixed the "basic" Minecart protection
2019-02-19 21:46:08 +01:00
Florian CUNY
9b1e955d18 Added Flags#FLINT_AND_STEEL, Flags#FIRE_BURNING, Flags#FIRE_IGNITE and removed Flags#FIRE + fixed Flags#FIRE_SCOOPING description in en-US locale
Closes #414

commit 0b551d174289ea1b75e55f0f4d268592a716f66f
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:50:08 2019 +0100

    Updated FireListenerTest

commit 3f2cc83037e1994a686bacd4d8541eece8c9dc53
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:40:46 2019 +0100

    Added descriptions in en-US for FIRE_BURNING, FIRE_IGNITE and FLINT_AND_STEEL

commit 880df9e904a0121804a73c2fcb40b9faa2aa290b
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:35:54 2019 +0100

    Fixed description of FISH_SCOOPING

commit 02259b0f8fdad31e7431d4d525b74bee6b499813
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:34:54 2019 +0100

    Improved description of FIRE_SPREAD

commit 92c5d137d8fb114dacdebc32626e04a5ee16982b
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:30:17 2019 +0100

    Added Flags#FIRE_BURNING and Flags#Fire_IGNITE

    These are SETTING flags

commit 0be4a87c1986a55a15fa16e87e4073921a269e34
Author: Florian CUNY <poslovitch@bentobox.world>
Date:   Tue Feb 19 10:21:52 2019 +0100

    Added Flags#FLINT_AND_STEEL

    #414
2019-02-19 10:56:11 +01:00
Florian CUNY
095237cd5d Flags#values() will no longer return deprecated flags
Deprecated Flags are flags that will be removed. It is therefore better to not return them in this method.
2019-02-19 10:09:45 +01:00
Florian CUNY
66de769bb0 Added Island#getVisitors() and Island#hasVisitors() 2019-02-18 21:53:48 +01:00
Florian CUNY
8e21785811
Added 'pardon' as an alias in IslandUnbanCommand 2019-02-17 21:11:51 +01:00
Florian CUNY
b9bc394945 Ignored failing tests 2019-02-17 15:10:40 +01:00
Florian CUNY
9174410998 Added 'options' as another alias to IslandSettingsCommand 2019-02-17 15:10:30 +01:00
Florian CUNY
dd467f27be Added the 'all players selector' to AdminResetsResetCommand#tabComplete(...) 2019-02-17 15:10:08 +01:00
Florian CUNY
dfc1f46730 Forgot to remove debug and commented-out code 2019-02-17 14:46:26 +01:00
Florian CUNY
028785c4b0 Fixed end portal not linking to normal end world
Fixes #306
2019-02-17 14:29:12 +01:00
tastybento
bce17ce467 Added admin trash command to handle damaged island db (#546)
* WIP - adds admin commands to handle damaged island db

Trash, purge, etc.

DO NOT MERGE YET

https://github.com/BentoBoxWorld/BentoBox/issues/505

* Prefixes the island uniqueId with the game mode name.

This enables manual removal of old game mode island files from the
database by admins if required.

* Adds Admin trash and empty trash commands

* Adds various commands for trash management

* Remove unused imports

* Forgot the javadoc in IslandsManager
2019-02-17 13:32:05 +01:00
tastybento
063303ad0e Adds admin command to reset all island flags to default
Used when an admin wants to change the default flag settings for all
islands and reset every one in the world.
2019-02-16 22:31:46 -08:00
Florian CUNY
af6ec400d1 Fixed tests 2019-02-16 22:58:46 +01:00
Florian CUNY
658bd10e5c Removed unused imports in PortalTeleportationListener 2019-02-16 22:51:17 +01:00
Florian CUNY
edd774d979 Merged Standard and Island Nethers portal handling in the same method 2019-02-16 22:48:05 +01:00
DarkRails
781676a90f Remove inventory clear in any case (#553)
Before this change, the inventory was cleared in any case even if inventory clear is set to false in configuration
2019-02-16 11:43:39 -08:00
Florian CUNY
3aefdc449d Renamed NetherPortals to PortalTeleportationListener
It is a way more explicit and conventional name, in my opinion!
2019-02-16 11:17:48 +01:00
Florian CUNY
a364128c5e Extracted standard nether/end spawns protection into its own listener
It was previously handled in the NetherPortals listener
2019-02-16 11:09:34 +01:00
Florian CUNY
5d7a7a0363 Ignoring NetherTreesListenerTest for now 2019-02-16 10:59:30 +01:00
Florian CUNY
9803a02471 Added NonNull to all listeners constructors 2019-02-16 10:58:25 +01:00
Florian CUNY
16c4c9b0be Revert "Fixed errors in tests"
This reverts commit b7f9892d95.
2019-02-16 10:48:41 +01:00
Florian CUNY
0d7836ff12 Revert "Made each "basic" listeners register themselves on instanciation"
This reverts commit 53137b526d.
2019-02-16 10:48:39 +01:00
Florian CUNY
44729ae9cb Moved NetherTreesListener to the correct package 2019-02-14 11:34:33 +01:00
Florian CUNY
b7f9892d95 Fixed errors in tests
However, tests are still failing!
2019-02-14 11:32:16 +01:00
Florian CUNY
53137b526d Made each "basic" listeners register themselves on instanciation 2019-02-14 11:24:58 +01:00
Florian CUNY
7ac5f556a1 Started NetherTreesListenerTest
I haven't worked that much on it yet. I've got tons of other things to do!
2019-02-14 11:13:00 +01:00