Commit Graph

25 Commits

Author SHA1 Message Date
tastybento d77c94c30c Fix #2320. Enables hiding of flags when in another world
The world was being taken from the user's location not the panel's world
2024-03-16 10:04: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 9ccdcceaba Refactor to reduce complexity 2023-02-05 16:19:05 -08:00
tastybento 18983e5570
Code cleanup (#2065)
* Cast operands to (double)

* Code clean up from static analysis

* Revert the GitHubAPI version change because it didn't work.
2022-12-29 10:01:25 -08:00
BONNe 09ab327551
Implement a flag that rules all flags. (#1927)
Add new Protection Flag: CHANGE_SETTINGS. This flag allows set which rank can change island settings. By default, it is set to OWNER rank and minimal value is MEMBER rank.

Fixes #1493
2022-01-28 18:45:50 -08:00
tastybento 8eb45e817c Code smell reduction 2021-09-18 08:15:15 -07:00
Justin 0f7866a00b
Parent/sub-flag support, split up and designate CONTAINER flag as parent flag (#1784)
* Split CONTAINER flag into multiple flags

CONTAINER split into
- CONTAINER (Chest/Minecart Chest)
- BARREL (Barrel)
- COMPOSTER (Composter)
- FLOWER_POT (Flower Pot)
- SHULKER_BOX (Shulker Box)
- TRAPPED_CHEST (Trapped Chest)

Fixes #1777

* Add subflag support

* Create container parent flag, chest subflag

* Remove extra string from when CHEST was CONTAINER

* Fix incorrect flag specified on fired event in IslandToggleClick

* Add missing world subflag event firing

* Remove extra import
2021-07-06 13:41:23 -07:00
Florian CUNY 8119b5c99e Moved Flag events to api/events/flags package 2019-08-10 13:15:33 +02:00
tastybento 13ee55a173
Tab panels (#857)
TabbedPanel extends Panel so that when an icon is
clicked, the context can be gathered by the click listener via the
getActiveTab method. In this case, the CycleClick and IslandToggleClick
classes cast the tab to the SettingsTab so they can retrieve the island
that the panel is referring too. This is required in the case where an
admin is setting a user's island settings. Previously the context of a
panel was only every about the user who opened the panel.

* Adds a tabbed panel API

* Added permission for tab

* Adds default world protection settings GUI

This switches the settings panel to use the new TabbedPanel API.

https://github.com/BentoBoxWorld/BentoBox/issues/384

* Adds admin command to change a player's settings.

Requires addon to add the admin settings command.

https://github.com/BentoBoxWorld/BentoBox/issues/59

* Locale for AdminSettingsCommand
2019-08-03 16:45:41 -07:00
tastybento 5de285249f Make getPermissionPrefix consistent
https://github.com/BentoBoxWorld/BentoBox/issues/870
2019-07-29 12:00:45 -07:00
tastybento 0f5629b729 Adds new flag change events and fires them.
Updated click tests.

https://github.com/BentoBoxWorld/BentoBox/issues/753
2019-07-28 16:15:23 -07:00
tastybento 3f3ac57f1e Cleans up code smells. 2019-07-11 13:55:17 -07:00
tastybento b1f66eb31b Fixes bugs and code smells from Sonarcloud. 2019-07-04 16:54:05 -07:00
Florian CUNY 86b9202b53 Fixes commit 4f84f37461
It was using the Player#sendMessage() instead of User#sendMessage()
2019-06-01 07:33:03 +02:00
Florian CUNY 4f84f37461 Send message to player to tell he cannot change the island settings as he's not owner
#638
2019-05-04 23:27:53 +02:00
tastybento 23491d0c4a
Flag visibility (#617)
* Saves world settings to config.yml when they are changed mid-game.

* Fixes and adds to tests

* WIP: Added visibility settings for flags.

Tests still need to be fixed and requires saving to config.yml.

* Fixes tests

* Completed changes.

* Renames method to be hidden flags instead of visible settings

GameModeAddons will need to adjust WorldSettings API based classes.
2019-03-23 15:38:06 -07: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 468ad4e83d Fix cycle click nullables 2019-01-20 10:04:32 -08:00
Florian CUNY 819096eba9 Fixed usage of deprecated methods in CycleClicks and fixed a probable NPE 2019-01-20 09:47:15 +01:00
tastybento de45872c07 Creates generic IslandEvent that has the reason as an enum
Adds JavaDocs on the event reasons and when they are called.
Completed island Lock event. As locking is a rank and not a binary the
UNLOCK event is not really useful and can probably be removed.

https://github.com/BentoBoxWorld/bentobox/issues/346
2018-11-18 19:03:27 -08:00
tastybento c2e9490bb0 Added min/max options for cycle click and restricted lock flag.
https://github.com/BentoBoxWorld/bentobox/issues/332
2018-11-10 19:28:46 -08:00
tastybento 633007630d Fixed issue where settings.* permission was not working 2018-08-25 11:28:06 -07:00
Florian CUNY 7ec497a93b Fixed general.errors.no-permission being sent twice 2018-08-12 18:50:12 +02:00
Florian CUNY 3212b7180d Changed a few locale references for consistency
Removed `general.errors.you-need` to put the [permission] variable in the `general.errors.no-permission`.
Renamed all confirmation-related references to `commands.confirmation.xxx`.
Renamed `protection.panel.flag-item.xxx_rank` to use a dash instead of an underscore.
2018-08-12 18:47:31 +02:00
Florian CUNY 3473fb48e6 Renamed 'world.bentobox.bbox' to 'world.bentobox.bentobox' 2018-07-31 18:03:32 +02:00