Commit Graph

26 Commits

Author SHA1 Message Date
tastybento eef3dcbc46 Allow the maxhomes to apply per island. 2024-03-13 17:58:28 -07:00
tastybento 0e0c502e1d
Team gui (#2251)
* WIP - add GUI for teams.

* WIP teams GUI

* Moe WIP on team GUI

* Modified file to avoid an NPE.

* Minor refactor to prevent int to Integer warning.

* Use latest dependencies for tests to pass.

* Move to singleton pattern for RanksManager,

* Team GUI WIP

* Added support for kick, setowner, and leave.

* Added support for accepting and rejecting an invite.

* Fixed bugs with text and operations.

* WIP for team invites.

* Adds inviting to the GUI.

* Fix tests

* Fixed minor bugs reported by SonarCloud

* Up Minecraft version and paper to 1.20.4 in POM

* Added features based on Discord feedback.

1. added some lore to the invite button to explain the players shown are
from the game world
2. removed the team state in chat
3. added a search to the invite panel

* Added back button.

Refactored some code and templates.

* Fixed bugs with teams and uncoop untrust etc of Ops.

* Return to name search GUI if name not found.

* Added return to GUI for player search

* Use Path.of
2024-01-08 20:50:26 +09: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
BONNe da98bbcf38
Extend ranked commands (#1928)
* Add CompositeCommand#defaultCommandRank variable.

This variable stores default rank for a command. This adds more flexibility to the Island#commandRanks object. This change allows specifying default rank for each command.

* Add more commands for users to configure on their islands.

Owners now can specify who can use:
- sethome command
- renamehome command
- deletehome command
- setname command
- resetname command
2022-01-28 18:41:20 -08:00
tastybento b5d9d2e52e API: Require getWorldSettings to be a game mode world 2021-10-03 20:33:50 -07:00
tastybento d780bbd4c0
1.18.0 (#1860)
* Mark all home-related methods in PlayersManager as deprecated.

* Fix bug where maxHomes was shown as null

* Version 1.18.0

API changes may break compatibility with Addons.

* Remove usage of deprecated methods except for migration code.

* Prevent NPE. Check isPlayer instead of getWorld() == null

* Fix nullability issue and added to @Deprecated annotations

* Added deprecation notices to home methods in Players
2021-09-26 13:35:18 -07:00
tastybento 690ea2f99e Prevent NPE possibility. 2021-09-19 18:36:37 -07:00
tastybento 2098fd636a Fix home listing on error.
https://github.com/BentoBoxWorld/BentoBox/issues/1737
2021-04-07 21:20:48 -07:00
tastybento b6a69d0c90
Switch to island homes from player homes. (#1689)
* Switch to island homes from player homes.

Stores home locations and max homes in the Island object. Adds commands
required to manage home names, specifically rename and delete. I did not
add list as there is tab complete on island go, but it may be required.
2021-03-01 10:42:08 -08:00
tastybento 54bc554763 Code smell reduction 2020-09-12 16:55:54 -07:00
tastybento fdb4df3d93 Show correct missing permission for multi sethome command
Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1367
2020-05-25 16:44:22 -07:00
tastybento b29da53f43 Revert "Made BentoBoxCommand#setup() default (#1258)"
This reverts commit 7de842e284.
2020-04-07 13:38:44 -07:00
Florian CUNY 7de842e284
Made BentoBoxCommand#setup() default (#1258)
* Made BentoBoxCommand#setup() "default" and deprecated it

* Undeprecated BentoBoxCommand#setup() and changed its javadoc

* Put back setup in IslandGoCommand and IslandSethomeCommand

* Removed setup in AdminPurgeStatusCommand
2020-04-04 20:40:14 +02: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
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 d7db3b034c Removed debug 2019-02-11 22:44:38 -08:00
tastybento 9dfb0573d9 Adds test class for Island Sethome command.
Refactors some of IslandSethomeCommand class to use the new canExecute
method.
2019-02-11 15:54:15 -08:00
tastybento dd3bd6d9e7 Fixes sethome in nether and end bug.
https://github.com/BentoBoxWorld/BentoBox/issues/538
2019-02-11 14:46:54 -08:00
tastybento 1dc56dfc4f Removes runnable from approach.
This could cause problems with threads because runnable should not be
run like this (effectively async). It should only be run inside a Bukkit
scheduled task to run on the main thread.
2019-02-10 20:11:50 -08:00
tastybento 360cda5a1c Uses translations for the confirmation call 2019-02-02 18:26:12 -08:00
Florian CUNY ec2793e6f8 Made IslandSethomeCommand a ConfirmableCommand
#237

It adds a bunch of WorldSettings and updates the en-US locale as well!
2018-10-25 09:43:36 +02:00
Florian CUNY 5391544e9c Fixed "island.maxhomes" permission not being appended with the addon's permission prefix
This may help for #256.
2018-10-20 11:45:41 +02:00
Florian CUNY 95bfab916e Replaced Util#getPermValue(Player, String, int) with User#getPermissionValue(String, int) 2018-10-20 11:32:42 +02:00
tastybento 67ab937b97 Revert "Removed useless #setDescription() and #setParameters() in commands"
This reverts commit 0e8e9dde67.
2018-08-10 13:47:58 +09:00
Florian CUNY 0e8e9dde67 Removed useless #setDescription() and #setParameters() in commands 2018-08-09 11:56:05 +02:00
tastybento 3c74ef0694 Moved admin and island commands into API package 2018-08-02 19:26:46 -07:00