Commit Graph

721 Commits

Author SHA1 Message Date
Tastybento
ea089b5b7d Moved hasTeam and hasIsland from PlayersManager to IslandsManager
Added IslandTeamInviteCommandTest.
2018-05-06 16:26:40 -07:00
Tastybento
030e7e44ca Added test classes for Team Kick and Leave.
Fixed bugs in the team classes.

Completed the Island Info command.
2018-05-06 15:24:32 -07:00
Tastybento
c7d9fed400 Added a lot of tests to IslandManagerTest class. 2018-05-05 22:26:25 -07:00
Tastybento
0a17639529 WIP added some admin commands. Still not finished.
Get rank, set rank, info.
2018-05-02 21:23:02 -07:00
Tastybento
0eae384b97 Added DefaultHelpCommandTest
Changed CompositeCommand to use a StringBuilder for better efficiency.
2018-05-02 19:15:07 -07:00
Tastybento
fe26eeda2a Fixed copy and paste bug in previous commit.
Next time I'll remember to build before committing!
2018-05-01 23:25:49 -07:00
Tastybento
cccbf2d270 Removed code smells. 2018-05-01 23:20:13 -07:00
Tastybento
de85f85bbe Enabled settings flag clicks to work.
A listener can be added to a flag. This listener is the same as a panel
item listener. When the settings flag is clicked, it'll call the
listener. There is a default listener. Right now the default is called
UpDownClick.java. This makes the rank go up when you left click and down
when you right click. Another implementation may be to just have the
rank loop around with left clicks.

I added two more ranks - Admin and Mod. These are special ranks that
have a value above owner. If a player is given this rank, they can
bypass protections. This will avoid the need to use permissions and also
enable islands to be set up that for example, only Admins can edit, but
Mods cannot.

So, it's now possible for an owner to lock out team members from the
island as well as visitors. This is a bit weird and so more click
classes should be created. For example, one that just toggles between
Owner and Visitor.

Currently, only an island owner can change settings, but this could be
expanded to allow members. Also, it will need to be expanded to allow
Admins.
2018-05-01 22:56:10 -07:00
Tastybento
6e810747f4 Added island lock class and test class
Island lock is combined with island ban in terms of the Listener. It is
LockAndBanListener. It is a flag because after thinking about it, it
made sense to be just like any other island setting. Also, island owners
can now (in theory) lock out others by rank.

Although the test class says everything works, the Settings GUI needs to
enable toggling so that players can lock the island.

Enjoy banning players!
2018-04-30 01:12:32 -07:00
Tastybento
41631e8a18 Fixed a few code smells for tests. 2018-04-29 19:01:30 -07:00
Tastybento
3cbcf52319 Added ban enforcement class and test class.
This prevents players from entering islands when they are banned. In the
future, it should also be extended to enable island locking.

Still needs a bit of work around Ops and bypass perms.
2018-04-29 18:48:38 -07:00
Tastybento
76711f5d09 Added /island banlist command and test class.
Note that preventing players from entering banned islands must still be
implemented.
2018-04-29 11:17:12 -07:00
Tastybento
729974c1be Added unban command and test class
Added ban and unban to the island command.

Added class and tests for tabComplete for both commands.

Tested.
2018-04-28 23:05:49 -07:00
Tastybento
08023c6dbf Added Island Ban command and test classes. 2018-04-28 18:17:12 -07:00
Tastybento
673c404719 Finished up /island reset confirm 2018-04-28 16:32:34 -07:00
Tastybento
0bdc146da3 Added confirmation to IslandResetCommand
Added test class.
2018-04-28 12:50:07 -07:00
Tastybento
72306035f6 Added test for SafeSpotTeleport
It's not a great test.
2018-04-28 10:32:03 -07:00
Tastybento
26eb6c275e Added test for SafeTeleportBuilder. 2018-04-28 09:50:07 -07:00
Florian CUNY
d0a66299de Edited some references and manually updated REFERENCES.md 2018-04-28 12:31:53 +02:00
tastybento
1e50b9e4cf Added AdminCommand test.
Added "no such command" error message when trying a command that does
not exist.

Removed unnecessary imports.
2018-04-28 14:36:17 +09:00
tastybento
aad5239ba3 Added logging methods to BSkyBlock to avoid plugin.getLogger()
plugin.getLogger() is a final class and so cannot be mocked. It was
making development of tests very hard. By making three logging methods
in BSkyBlock.java, they default to do nothing when BSkyBlock is mocked.
Previously, every time there was a use of logger in testing it was
throwing NPE's because plugin.getLogger() was returning null and the
getLogger() method could not be made not null by mocking because it was
final (in JavaPlugin).
2018-04-28 13:02:15 +09:00
Tastybento
67d86cc1d9 Reverting. No code in Sonarcloud for some reason. 2018-04-27 17:44:05 -07:00
Tastybento
e99a77925f Trying to update to new sonarcloud branch setting in travis 2018-04-27 17:29:40 -07:00
Tastybento
54a524ff97 Testing travis to see if I can get the branch name 2018-04-27 17:24:24 -07:00
tastybento
dd8646523a
Fixed formatting for REFERENCES 2018-04-27 17:12:18 -07:00
Tastybento
e18aebee5f Added locale references text file. 2018-04-27 17:10:42 -07:00
tastybento
b2e68c22d4 Added Addon class unit tests. 2018-04-27 16:34:17 +09:00
tastybento
5cc71c2a2f WIP AddonTest class 2018-04-27 11:29:15 +09:00
tastybento
8fb9512f16 Filled in a few more User class tests. 2018-04-27 10:26:50 +09:00
tastybento
a2a23d0771 Merge remote-tracking branch 'origin/develop' into develop 2018-04-27 09:21:03 +09:00
tastybento
ca5fdbd71d Implemented User class JUnit tests.
Fixed some bugs in User, Notifier.
2018-04-27 09:20:51 +09:00
Florian CUNY
9639872685
cleaned PVPListener from "us.tastybento.bskyblock.lists.Flags" 2018-04-26 16:06:47 +02:00
Banbeucmas
24fe6f3669 Added Vietnamese to the locales (#162)
* Adding Vietnamese

* Ignore .idea

* Adding Banner
2018-04-25 18:04:28 +02:00
Florian CUNY
ecb630fac3 Fixed some code smells 2018-04-25 13:48:58 +02:00
tastybento
135f35131c Finished IslandCacheTest. 2018-04-24 14:22:33 -07:00
tastybento
bf5a30e7a1 Added IslandCacheTest WIP
Cleaned up IslandCache, IslandsManager and Island.
2018-04-24 13:18:22 -07:00
Florian CUNY
49c7fb0f05 Updated (a bit) the french locale 2018-04-24 18:11:56 +02:00
Florian CUNY
0e45aa664d Finished and polished the Language Panel 2018-04-24 18:02:29 +02:00
Florian CUNY
175f832f41 Removed the sanity check, which could lead to weird issues 2018-04-24 17:04:29 +02:00
tastybento
0fe453c163 https://github.com/tastybento/bskyblock/issues/161 2018-04-23 16:51:18 -07:00
Florian CUNY
5ebbc2e374 Created the language panel. It is currently not localized. 2018-04-23 21:16:08 +02:00
Tastybento
45101901bd Fixed loadObject for MySQL.
The uniqueKey needs to be enclosed in quotes "" to work.
2018-04-21 11:41:48 -07:00
Tastybento
6ff8c1a3d8 Added obsidian scooping.
In ordeer to test, I needed to change a few other classes.
2018-04-21 09:03:39 -07:00
Tastybento
e881a5bd2b Removal of code smells.
Removed a lot of debug code.

Refactored some loops into lambas.
2018-04-18 19:07:20 -07:00
Tastybento
01aef76eb5 Removed debug from util. 2018-04-18 11:18:07 -07:00
Tastybento
1fd2b93ce8 Improved serialization and deserialization for flatfile db. 2018-04-18 10:51:32 -07:00
Tastybento
f98c5527bc Improved accuracy of location - string conversion. 2018-04-18 10:47:20 -07:00
Tastybento
2e1c055cd7 Made BSBDatabase much easier to use for addons
Now obtaining the database handler is easy and understandable.
2018-04-15 17:30:42 -07:00
Tastybento
a5cc4c20ea Updates due to Challenges development. 2018-04-08 19:54:37 -07:00
Tastybento
a95e869cc9 Now reads addon.yml as a YAML file
Also imports level 1 permissions, i.e., does not handle children.
2018-04-05 18:56:48 -07:00