Commit Graph

18 Commits

Author SHA1 Message Date
tastybento 2b19d43c85 Remove restrictions on having multiple islands for team members.
Added API to enable checking for teams on islands easier.
2024-03-29 19:38:44 -07:00
tastybento 12bf37d2c2
No tabs (#2243)
* Remove all tabs from source and replace with 4 spaces.
2023-12-04 20:55:40 -08:00
tastybento 63d092db93
Multi island api update (#2224)
* Fixes bug with island team joining and deletion. Include debug.

* Remove ambiguous API with mutli-island.

* Add back deprecated methods so developers can be wartned not to use them

* Added back in deprecated methods.

* Fix bugs and NPEs.

* Fix some code smells

* Remove debug logging.
2023-11-12 12:22:12 -08:00
tastybento a4bef159be
2 0 0 multi island (#2185)
* Multi world WIP - stashing

* Initial work on supporting multiple islands per player

The default allowed number is 5 for now, but will be set to 1 by
default.

Lots more work to do on this!

* More work on multi island. Fixed tests so clean compile.

* Remove unused imports

* Updated island go and homes command to multi island

Updated tests.

* Do not reload addons anymore.

* Add island name when entering or leaving own island

* Remove unused import

* Adds island names to /island go command.

* Enables more homes to be set if player has more than one island

* Switch to using a set for islands and explicit primary boolean in Island

* WIP

* Fix bugs with the go command.

* Be able to delete multiple islands, e.g. when joining a team

This is not fully tested.

* Do not remove all islands when a player does reset.

Players can reset just the island they are on.

* More fixes for go command

* Fix tests

* Fix @NonNull annotation

* Fix home syntax listing reference for IslandDeleteHome

* Fixed deletehome for multiple islands.

* Fix /island command teleport to current island default home.

* Remove deprecated code.

* Fix tag for concurrent island setting in config.yml

* Improve error when trying to make additional islands over limit

* Update config.yml

* Correctly assign invites for islands.

* Switch to canExecute API in prep for multi-island handling

* Prevent players from obtaining more concurrent islands by owner transfer

* Handle leaving and disbanding of teams

* Fix tests

* Fix minor bugs or code smells.

* Restore the quarantine code from deprecation.

This code can stay. It checks if islands can load, and if not puts them
in a trash. It does no harm.

* Remove unneeded eq()'s

* Fix tests
2023-09-16 15:55:52 -07:00
tastybento 2c283ae3a9
Javadoc and other cleanup from code analysis (#2099) 2023-02-26 17:48:37 -08:00
tastybento b247b360bf Fix test. 2021-09-18 12:25:25 -07:00
tastybento ae63125f50
Enables UUIDs to be used in admin commands as well as names (#1298)
Implements a solution for #1297.

Adds Util#getUUID(String nameOrUUID)
2020-04-23 21:16:09 +02:00
tastybento 3f1d6d16ff Added Mockito.framework().clearInlineMocks() to all test classes per
https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2

This is just e defensive measure and may not have an affect on any
particular class.
2019-12-06 08:29:29 -08:00
Florian CUNY a2607c913f Fixed AdminDeleteCommand tests (oopsie) 2019-02-10 22:59:03 +01:00
Florian CUNY b20ef00853 Updated locales to replace all references of "leader" to "owner"
The island owner is no longer both known as "owner" or "team leader" depending on the methods you're using : it's "owner" everywhere now. Period. 🎉
2018-12-09 13:41:09 +01:00
Florian CUNY a04a0cb3d0 Replace code referencing "teamleader" to "owner"
This will improve the consistency of the code, as well as the Javadocs.

Locales (and some other files) still need to be updated to remove these references to team leader.
2018-12-09 11:28:31 +01:00
Florian CUNY 0322ffe0ce Deprecated #getTeamLeader(...) methods
These have been deprecated in CompositeCommand, IslandCache and IslandsManager and they got replaced by #getOwner(...).
2018-11-18 11:12:54 +01: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
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
Florian CUNY 539d2a0516 Fixed some code smells 2018-08-15 09:43:28 +02:00
Florian CUNY e11f173ca3 Made /is reset use the command cooldown API + switched "wait" settings to int
Aaaand had to update some tests. Lots of tests.
2018-08-14 21:11:46 +02:00
tastybento 82c35f9aa9 Fixed test breaks. 2018-08-12 14:28:25 -07:00
tastybento ea0f64a770 WIP added AdminDeleteCommand 2018-08-09 05:13:54 +09:00