Commit Graph

1589 Commits

Author SHA1 Message Date
tastybento
39c3861391 Item Frames could be placed on any island.
https://github.com/BentoBoxWorld/BentoBox/issues/610
2019-03-17 15:18:19 -07:00
tastybento
47900fd183 Handle null center locations.
Cloning null was causing an NPE.
2019-03-16 10:44:14 -07:00
tastybento
277378aaa3 Fix to BentoBox version error
https://github.com/BentoBoxWorld/BentoBox/issues/608
2019-03-13 18:03:58 -07:00
tastybento
ed7e301b82 Removing sorting of gameworlds for debug purposes
https://github.com/BentoBoxWorld/BentoBox/issues/608
2019-03-13 08:51:29 -07:00
tastybento
60b075c668 Fixes bug where coop or trusted could sethomes on other islands
https://github.com/BentoBoxWorld/BentoBox/issues/588
2019-03-13 00:01:23 -07:00
tastybento
8ad546df6f Fixes home teleport when in some types of boat
Oak and spruce boats were causing errors due to the mismatch between
enums for tree species and material names.

https://github.com/BentoBoxWorld/BentoBox/issues/606
2019-03-12 23:52:05 -07:00
tastybento
3f355f59d1 Added defensive code to protect from null gamemode worlds
Related to https://github.com/BentoBoxWorld/addon-invSwitcher/issues/2
2019-03-12 23:22:04 -07:00
tastybento
fd7e3e4154 Changed approach to support test concurrency 2019-03-12 20:35:33 -07:00
tastybento
cb09ec2e3a Switched from plugin.getServer() to Bukkit.getServer() to enable tests
plugin.getServer() cannot be mocked because it is final.
2019-03-11 22:58:30 -07:00
tastybento
adf0b8247f Added database test classes for YAML 2019-03-11 22:53:40 -07:00
tastybento
384047329f Added Database class unit test class 2019-03-11 20:26:41 -07:00
tastybento
015f1dd694 Fixed setUp name of method 2019-03-11 19:01:45 -07:00
tastybento
a2631b88a6 Removed static and server calling from test class. 2019-03-11 19:00:05 -07:00
Florian CUNY
2935f41173 Made Island#getCenter() return a clone of the Location
As suggested in https://github.com/BentoBoxWorld/BentoBox/issues/591#issuecomment-471314358
2019-03-11 13:41:01 +01:00
tastybento
75bbc13cf5 Improved islands async deletion from database (#605)
Addresses https://github.com/BentoBoxWorld/BentoBox/issues/591
2019-03-11 08:41:41 +01:00
tastybento
cfa6861e58 Added IslandCreateCommand test and use of canExecute API. 2019-03-09 22:09:54 -08:00
tastybento
a6e72ec018 Small change to CustomIslandMultiHomeHelp test. 2019-03-09 22:09:11 -08:00
tastybento
e0a8831ae0 Added test class for CustomIslandMultiHomeHelp class 2019-03-09 21:22:00 -08:00
tastybento
2cdbc25f6a Rewrote Flag test class for better coverage 2019-03-09 20:55:54 -08:00
tastybento
127bc1e338 Removed extraneous BeforeClass from Flag test class 2019-03-09 19:33:18 -08:00
tastybento
ac079a6686 Improved PanelItemBuilder test class 2019-03-09 19:31:18 -08:00
tastybento
91dec86b5a Added tests to SafeSpotTeleport test class 2019-03-09 19:31:06 -08:00
tastybento
78d45364aa Improved FireListener test class 2019-03-09 19:30:49 -08:00
tastybento
58a975b5a5 Cleaned up MobSpawnListener test class. 2019-03-09 18:55:29 -08:00
tastybento
a1e6f37963 Fixes HurtingListener test class 2019-03-09 18:50:34 -08:00
tastybento
9f997f4548 Fixes MobSpawnListener test class 2019-03-09 18:50:19 -08:00
tastybento
ee5a2c920b Added Panel Test class.
Fixed bugs with head requesting.
2019-03-09 18:43:27 -08:00
tastybento
8f24e59a21 Fixes IslandsManager test cases and pufferfish removal
The clear area method should not remove pufferfish as per
https://github.com/BentoBoxWorld/BentoBox/pull/595
2019-03-09 16:54:54 -08:00
tastybento
16388e4721 Added Notifier test class 2019-03-09 16:42:46 -08:00
Florian CUNY
1953d966dc Fixed code smells in YamlDatabaseHandler 2019-03-09 21:55:13 +01:00
BONNe
7a0939e171 Improved handling of Phantoms, Pufferfishes and a few other mobs (#595) 2019-03-09 21:21:46 +01:00
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