Commit Graph

117 Commits

Author SHA1 Message Date
tastybento
10d5c262ca Added test class for PanelListenerManager
Refactored some code to be more streamlined.
2018-06-10 21:10:02 -07:00
tastybento
92a7b0e596 Added admin "world" command.
This is used to set world settings.
2018-06-10 17:23:48 -07:00
tastybento
1240cd266e Implemented remove mobs on teleport
I simplified this to just remove mobs on login and island teleport. The
mobs to keep are currently hard coded. They could be taken from settings
in the future.
2018-06-09 23:06:59 -07:00
tastybento
90563dac35 World Flags are saved in the config.yml file.
Previously, world settings (world setting flags) were not actually being
saved anywhere. They are now saved in the config.yml.

WIP: RemoveMobsListener.java

Improved the FlagTest.
2018-06-09 22:09:20 -07:00
tastybento
db3344c8b9 Completed Invincible Visitors and PVP listeners.
This was a lot more work than I expected, but in the end the test class
was the best approach to cover all the edge cases.
2018-06-09 15:54:09 -07:00
tastybento
4534c16416 Fixed enter/exit messages for unowned islands and tests. 2018-06-08 08:26:07 -07:00
tastybento
9a666e29ca Added specific WORLD_SETTING flag.
This flag is separate from island SETTING flags. The settings are done
in a different way and rather than try and work out which type is which,
it is better to specify them at the start.

Also added a SUB_MENU settings type.
2018-06-08 08:20:16 -07:00
tastybento
aed648e6e7 Added Piston Push setting.
Allows/Disallows piston pushing outside an island.
This is a worldwide setting for admins.

https://github.com/tastybento/bskyblock/projects/3#card-10260101
2018-06-04 19:24:11 -07:00
tastybento
5904ef9194 Added Enter/Exit messages
This required adding support for world-specific toggle settings.

This also affected some other listeners.
2018-06-03 20:54:37 -07:00
tastybento
1289060bd4 Merge branch 'confirmation' into develop
Conflicts:
	locales/en-US.yml
	src/main/java/us/tastybento/bskyblock/commands/island/IslandResetCommand.java
2018-06-03 14:03:46 -07:00
Florian CUNY
884df8f07d Fixed tests to use the TextVariables 2018-06-03 10:31:22 +02:00
Florian CUNY
08e11e90fa Made CycleClick handle right click 2018-06-02 21:42:14 +02:00
tastybento
e7649f19d4 Added cycling click to protection flags. 2018-06-02 11:27:51 -07:00
tastybento
320c9a9f43 Fixes help permissions. 2018-06-02 08:39:45 -07:00
tastybento
d94477034a Performed code cleanup using Intellij. 2018-05-31 18:52:05 -07:00
tastybento
d34ad5dce3 Fix bug with sethome not replacing previous homes. 2018-05-28 20:23:15 -07:00
tastybento
3404fac8f2 Arrays can stream directly. 2018-05-27 08:50:14 -07:00
tastybento
60eac8e54e Fixed bugs
Fixed issues where Settings were used instead of WorldSettings.
Added getWorld to the Admin team commands.
2018-05-27 00:05:36 -07:00
tastybento
66d9ef857d Removed constants that reference the island and admin commands.
Fixed bug where addon onLoad was being called twice.
2018-05-26 18:20:02 -07:00
tastybento
a5a75c6854 Fixed tests. 2018-05-26 15:50:10 -07:00
tastybento
007a9af025 Redid API for multiworld.
Now AcidIsland uses its own command instead of island.

Added a world element to commands so they can operate only in specific
worlds.
2018-05-26 13:08:35 -07:00
tastybento
6d17d48bde Removed AbstractIslandTeamCommand
This was using static data structure that would not work well when other
addons use the command.
2018-05-26 11:43:22 -07:00
tastybento
35b715ff80 Fixed tests. 2018-05-25 17:58:07 -07:00
tastybento
6a18cc4ccc More multi-world work.
This handles multiworld operation. Test with AcidIsland addon.
2018-05-25 12:19:46 -07:00
tastybento
82ee6d746e Added an Island World Manager that handles worlds
Still a WIP but it's gradually coming along.
2018-05-20 16:09:57 -07:00
tastybento
df696fb4a0 Reworked world checking.
Worlds are checked by the IslandWord class. Additional worlds can be
added to the list of worlds covered by BSB by Addons.
2018-05-18 23:08:18 -07:00
tastybento
9f6819bd3b WIP: Converted to a mutli-world/mutli-game type model
This branch adds a world aspect to almost all commands. Although the
Bukkit World class is used for reference, the world includes any nether
or end worlds too. By enabling multiworld, things like the protection
grid will operate independently in different world groups. The idea is
to enable one plugin to run mutliple worlds. For example run AcidIsland,
ASkyGrid and BSkyBlock at the same time.

In addition to this big change, I added an admin command to copy and
paste "simple" schematics that I called "schems". It does not work
completely correctly right now, especially for chest contents.
2018-05-17 21:25:12 -07:00
tastybento
21aa1691a5 Added Names database object to enable name->UUID lookup.
Added test classes for Players, Names and PlayersManager.
Debugged a number of issues with these classes.
2018-05-13 17:02:24 -07:00
tastybento
dd0770cf8c Added NetherPortalsTest class 2018-05-12 09:06:46 -07:00
tastybento
060549b5ec Switched to List from LinkedList for tab complete.
Added FlyingMobs test.
2018-05-11 21:05:19 -07:00
tastybento
366690116b Added test for Admin Info command 2018-05-09 16:37:12 -07:00
tastybento
a8cdce5d18 Added admin register command and test.
Unit tests pass, not tested in-game yet. Still no WiFi.

North Platte, Nebraska. 1856km to San Francisco. 800kph ground speed.
107kph headwind. -56C outside temperature. 12035m altitude.
2018-05-09 00:14:20 -04:00
tastybento
4f9c3e49df Added admin unregister island command and test.
Unit test passes. Not tested in-game yet.
2474km to San Francisco. 11552m high above Des Moines, Iowa.
2018-05-08 23:26:01 -04:00
tastybento
62d8249468 Added admin Make Leader command and test.
Unit test passes. Not tested in-game because I'm 9930m above Chicago,
it's 2858km to San Francisco, it's dark, I'm wearing sunglasses, and I
have no Wi-Fi!
2018-05-08 22:56:24 -04:00
tastybento
5eb6447f01 Added admin team add command
Unit tests pass, but not tested on real server yet.
2018-05-07 20:11:03 -07:00
tastybento
354aff14f4 Added team admin commands kick and disband. 2018-05-07 15:55:35 -07:00
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
0eae384b97 Added DefaultHelpCommandTest
Changed CompositeCommand to use a StringBuilder for better efficiency.
2018-05-02 19:15:07 -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