Commit Graph

35 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 ca2976cc4b Test clean up. 2024-01-08 22:21:31 +09: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 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 24148f30ba
Rank Management (#2220)
* Put ranks in the database. Prework for #1798

* Prevent coop and trust commands from being registered

if those ranks don't exist.

* Add /bbox rank command for ranks management

* Rename RanksObject to Ranks

* Strip / on commands if it exists. Fixes #2221

* Fix test failure
2023-11-10 10:53:28 -08:00
tastybento ca604f893c
Relates to #2104. Adds user.displayName() as a placeholder option (#2108)
* Relates to #2104. Adds user.displayName() as a placeholder option

* Fix test
2023-03-18 10:27:50 -07: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
tastybento ea4ef1e21a Adjusts tabComplete for a number of commands.
Enforces the need to type at least one letter for whole-server tab
completes.
2020-08-31 22:03:51 -07:00
tastybento bdbfd33a34
Fixed code smells (#1444)
* Code smell changes

* Fixes issues raised in reviews.
2020-07-09 09:03:01 +02:00
tastybento 0fec5aec51 Added insufficient rank error and fixed tests.
The no permission error was being added, but thats wrong because it's
not lack of permission but lack of rank that is the issue. This adds a
new error and shows it in the various commands.
2020-06-06 17:01:09 -07:00
tastybento d6b2a88b32 Fixes rank checking for team invites
Only owners could invite players successfully. This now checks based on
rank.
Added a method to allow rank checking on UUID. Had to make tests be
specific to the User.class.

https://github.com/BentoBoxWorld/BentoBox/issues/1377
2020-05-30 11:22:05 -07: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
tastybento 784988ca54 Test class cleanup. Use Bukkit direct calls instead of Bukkit.getServer 2019-10-18 19:33:24 -05:00
tastybento be673fa527 Switched to latest Mockito and PowerMockito libs. WIP 2019-08-03 18:05:15 -07:00
tastybento 91077ef895 Fixes NPE with island ban of an offline player
https://github.com/BentoBoxWorld/BentoBox/issues/872
2019-08-02 09:22:12 -07:00
tastybento 060c602009
Makes command ranks a protection setting (#823) 2019-07-08 20:02:58 -07:00
tastybento 9b0575246c Reworked island team coop command and test. 2019-06-01 13:22:28 -07:00
Florian CUNY 3c688a0b12 Ignored failing tests 2019-05-08 11:39:04 +02:00
Florian CUNY 8ba0ebd170 Added better success feedback messages for IslandBanCommand and IslandUnbanCommand
#630
2019-04-27 21:03:40 +02:00
Florian CUNY 4f7de44b67 Fixed tests 2019-03-03 15:33:54 +01:00
tastybento 96639792b8 Fixed random test failures.
Note: If using the User class in a test, you MUST set the mock plugin object using the User.setPlugin() method otherwise each test will use the wrong plugin object and verifications will not work.
2019-01-13 14:19:23 -08:00
tastybento 8a1b487a58 Fix test cases for ban commands. 2019-01-13 08:52:57 -08:00
Florian CUNY 8da1dc1590 Ignoring IslandBan- & IslandUnbanCommand tests for now
I could not get them to work again
2019-01-05 10:58:32 +01:00
Florian CUNY 369600e4d5 Renamed Island#addToBanList() and Island#removeFromBanList() + added log in them
They respectively got renamed to Island#ban() and Island#unban(). They now require the UUID of an issuer (which can be null, but it's better to provide one)
2019-01-03 15:59:24 +01:00
Florian CUNY c078d8dce6 Added ban limit (#getBanLimit() in WorldSettings)
Closes #423.

I had some trouble with unit testings, that's why I didn't update them to test the new features :(
2019-01-02 14:37:52 +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
tastybento c88ea31237 Fixes tab complete error with no island.
EWR ->  DEN
2018-11-30 17:39:24 -05: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 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 c1a6a233a9 Added team coop, uncoop, trust and untrust commands. 2018-08-12 16:43:47 -07:00
tastybento 82c35f9aa9 Fixed test breaks. 2018-08-12 14:28:25 -07:00
tastybento ba557a1068 API Breaker: renamed BSB classes to be just BB
Hopefully, this is the last API breaker. I renamed the classes that
started with BSB to be just BB (bentobox). I now have to fix all the
add-ons I just broke...
2018-08-05 20:08:03 -07:00
tastybento 765268aa25 Code cleanup using Intellij 2018-08-04 21:50:10 -07:00
tastybento 3c74ef0694 Moved admin and island commands into API package 2018-08-02 19:26:46 -07:00