Commit Graph

154 Commits

Author SHA1 Message Date
tastybento
6926ecbb9e Implements an island reservation system using the admin register command (#850)
* Implements an island reservation system using the admin register command

Admin flies to an empty spot and registers the player there. This
creates a bedrock block to mark the spot but it sets the island as
reserved for the target player. The next time a player issues the island
command (or island create) they get the selection of islands and it is
pasted at that location.

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

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>

* Update src/main/java/world/bentobox/bentobox/database/objects/Island.java

Co-Authored-By: Florian CUNY <poslovitch@bentobox.world>
2019-07-22 00:36:14 +02:00
Florian CUNY
affbb02ede Added database type to /bentobox version
Requested by @BONNe
2019-07-20 20:48:41 +02:00
tastybento
e284a6b57a Adds ability to require players to stand still for a command to execute
https://github.com/BentoBoxWorld/BentoBox/issues/837
2019-07-13 22:32:09 -07:00
tastybento
574fbc182f Added world protection settings to config
https://github.com/BentoBoxWorld/BentoBox/issues/840

This adds (or fixes) the ability for admins to set the default setting
of a protection flag. The flags go in the world flags section of a game
mode's config.yml.
2019-07-13 15:25:10 -07:00
tastybento
9422f8ac3d Added purge protection command and test class for purge.
Note that game mode addons must add the purge command before it can be
used.

https://github.com/BentoBoxWorld/BentoBox/issues/836
2019-07-11 22:50:32 -07:00
tastybento
3f3ac57f1e Cleans up code smells. 2019-07-11 13:55:17 -07:00
wellnesscookie
dd0396161e Fixes owner being allowed to demote himself (#834)
* Fixes owner demoting himself to subowner

This occurred whilst owner demoted himself to a subowner that led to non existence of the true owner

* Adds error on demote-yourself message
2019-07-11 07:52:57 -07:00
tastybento
b5367200df Adds admin purge command (#829)
Implements #5
2019-07-11 09:23:53 +02:00
tastybento
abd88c0826 Adds a cooldown API for flags. (#821)
* Adds a cooldown API for flags.

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

Added 60 second cooldown to PVP flags

* Added cooldowns to database.

This way, if a cooldown is a long one it will be remembered even if the
server restarts.

* Update src/main/java/world/bentobox/bentobox/database/objects/adapters/FlagSerializer3.java
2019-07-07 08:08:16 +02:00
tastybento
5c3817d9fe Added ELYTRA protection flag.
https://github.com/BentoBoxWorld/BentoBox/issues/386
2019-07-05 16:15:13 -07:00
Florian CUNY
64d89f9ca9 Improved success messages for admin commands and fixed failing tests
#630
2019-06-30 08:51:33 +02:00
Florian CUNY
c09ff50604 Added better success message to island expel command
#630
2019-06-29 18:07:47 +02:00
Florian CUNY
9fe43fe75c Added better success message to island team commands
#630
2019-06-29 17:34:55 +02:00
tastybento
99d34d06ba Better blueprint bedrock handling
Prevents blueprints from being saved unless they have a bedrock block in
them.
If a blueprint is loaded and does not have a bedrock block, one is added
and a warning given in the console.

Added test class for BlueprintClipboardManager

https://github.com/BentoBoxWorld/BentoBox/issues/777
2019-06-22 22:44:33 -07:00
Florian CUNY
02ca693ade Improved bentobox commands descriptions in en-US locale 2019-06-15 13:43:48 +02:00
Florian CUNY
3c1f033819 Added a period to "commands.bentobox.reload.warning" in en-US 2019-06-14 11:12:14 +02:00
Florian CUNY
5fc39b3691 Removed the check for updates button in the Management Panel
It needs the update checker to be implemented first
2019-06-09 17:52:15 +02:00
tastybento
9b8c8f6bc8 fixes issue with bbox reload command
https://github.com/BentoBoxWorld/BentoBox/issues/731

Issue was that classes were not being fully removed from class loaders
and commands needed to be unregistered from Bukkit. For the latter,
reflection was required to obtain the knownCommand map and change it
because there is no Bukkit API to unregister commands.
2019-06-07 17:37:16 -07:00
tastybento
40f0591f7a Enables blueprint bundle slot positioning in GUI
https://github.com/BentoBoxWorld/BentoBox/issues/708
2019-06-02 15:52:27 -07:00
tastybento
94e90257fa Adds renaming and icon setting to the Blueprint Management panel
https://github.com/BentoBoxWorld/BentoBox/issues/701
2019-05-26 22:03:09 -07:00
tastybento
2a1ce5eafa Added Blueprint Bundle renaming 2019-05-26 19:40:13 -07:00
tastybento
c725a397e1 Added switch command help description. 2019-05-26 14:23:04 -07:00
Florian CUNY
daeae01d7b Added addon state display in /bbox v output
Updated all the locales accordingly
2019-05-26 21:59:51 +02:00
tastybento
e1c8bb9f1c Adds Admin switch command to bypass protections.
Re-adds the global mod bypassprotect permission.

Adds removePerm and addPerm to user class.
2019-05-25 20:00:24 -07:00
Florian CUNY
775b7f2377 Improved gameworlds output in /bentobox version
It now displays the three dimensions for each world using a three-colour scale. Green means the world is generated and is an "island" world; orange means the world is generated but is not an "island" world and red means the world is not generated or does not exist. Actually, the overworld is always green, so I didn't put checks for it.

I also improved the overall layout for the game worlds display in each localization file.
2019-05-25 10:34:32 +02:00
Florian CUNY
0d89f42441 Renamed "commands.bentobox.version.game-worlds" to "commands.bentobox.version.game-world" in locales 2019-05-25 09:58:18 +02:00
tastybento
184a5712ae Fixes bugs with Blueprint locale.
Ensures newly saved Blueprints appear in blueprint manager.
2019-05-24 19:42:51 -07:00
tastybento
6024423dad Blueprint manager localization - WIP 2019-05-22 12:16:38 -07:00
tastybento
700043fe40 Implemeted Blueprint bundles and blueprints (#672)
* A prototype for Blueprint bundles and blueprints

This stores blueprints inside bundles. Each bundle can have up to 3
blueprints defines by the World.Environment.

This is not a finished manager. It just handles all the saving and
loading side of things. I thought this would help you so you can then
concentrate on the UI.

* WIP: Copy blocks to Blueprint done.

* WIP Pasting done.

* WIP: Added BlueprintsManager to ultimately replace SchemsManager.

* Moved blueprint suffix and changed to .blu

* Fixed unit test.

* Now tested and working.

Integrated with new island and resetting island.

If there are no blueprint bundles or blueprints then a default bedrock
set will be made and put in the game mode addon's blueprints folder.

Still to do: enable schems to be loaded and pasted for legacy support.
Add blueprints and a bundle to GameModeAddons like BSkyBlock.

* Renamed most of the classes

* Cleaned up clipboard and paster.

* Further cleanup on blueprint clipboard and paster.

* Merged blueprint classes into one package.

* Put Blueprint data objects in their own package.

Isolated schems classes for later removal.

* Renamed admin command classes and changed locale files.

* More clean up to remove schems

* Schem to blueprints converter done.

Converts schems to blueprint bundles and sets up a default set. Tested
the happy-path. Need to do more testing on edge cases.

* Added basic UI for development. Fixed bug with schem conversion.

* Adds permissions into the blueprints.

Fixes tests, cleans up some naming

* Added IslandCreationPanel and created BlueprintManagementPanel

* Fixed JSONDatabaseHandler's constructor being public

* Made the Blueprints button in ManagementPanel open the Blueprint management panel

* Fixed tests and ignored one (NPE)
2019-05-15 20:16:41 +02:00
Florian CUNY
e0b942063b Fixes TNT protection: split TNT flag into TNT_DAMAGE (SETTING) and TNT_PRIMING (PROTECTION)
#566 and #649
2019-05-12 15:26:51 +02:00
Florian CUNY
fa49e8b3b2 Made "commands.bentobox.reload.addon" use [name] text variable 2019-05-12 13:50:00 +02:00
Florian CUNY
3172cd098a Added message "addon reloaded" when reloading an addon 2019-05-12 13:49:12 +02:00
Florian CUNY
c60e790749 Added an islands count for gamemodes in Management Panel 2019-05-12 11:38:30 +02:00
Florian CUNY
eb05f1fca5 Added locale authors names in the Language Selection panel 2019-05-11 20:41:28 +02:00
tastybento
2e8150da84 Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git
into develop

Conflicts:
	src/main/java/world/bentobox/bentobox/managers/AddonsManager.java
2019-05-08 12:23:28 -07:00
tastybento
01022a2500 Added bentobox addon reload command. 2019-05-08 12:18:33 -07:00
tastybento
180b88544a Database transition (#662)
- JSON is now the default database type
- JSON database files are now pretty-printed
- It is now possible to migrate from a database type to another through the use of a command and specific transition database types
- It is recommended to move from YAML to JSON.

= Commits breakdown =

* Proposal to make JSON the default database and retire YAML.

* Make JSON file format easier to read.

* Fix tests.

* Adds a hybrid Yaml2Json database type.

This database always tries to use JSON if it is available. If a YAML
file is found, it will be loaded and replaced with a JSON file.

* Move to generic database transition code

* Better comments

* Adds transitional database options so admins can choose.

Adds Yaml2MySQL option and changes config.yml to add instructions.

* Enables full database migration between databases.

Adds /bbox migrate command.

Adds a number of transition databases. DB starts transition  when the
server boots up and will migrate organically. The admin can force an
immediate update using the bbox migrate command.

This operation requires an API breaking change: Addons that use the
Config API must now implement ConfigObject in their config class instead
of DataObject. This is to differentiate YAML config classes from YAML
database classes. If a class is already implements WorldSettings
(GameModeAddons), then no change is required because WorldSettings
implements ConfigObject now. If an old addon is used that does not
implement ConfigObject, BentoBox will not load.

* Added null check to YAML deletion

* Removed the 2YAML transition dbs because YAML is deprecated.

YAML does not support some data structures so conversion could corrupt
data.

* Fixed some javadoc and added missing DatabaseType#JSON2MARIADB

* Renamed package database/transitiondb to database/transition
2019-05-08 21:15:22 +02:00
tastybento
d8799f183f Makes copying schems to the clipboard async.
https://github.com/BentoBoxWorld/BentoBox/issues/504
2019-05-05 16:39:11 -07:00
tastybento
809e18b971 Adds island near command. 2019-05-04 22:24:04 -07:00
tastybento
9e15907f93 Added DYE protection flag
https://github.com/BentoBoxWorld/BentoBox/issues/653
(cherry picked from commit e94000528791e1abb30d19305e36529d825287b9)
2019-05-04 11:16:31 +02:00
Florian CUNY
95c0c612da Improved /bbox locale 2019-05-01 10:48:47 +02:00
Florian CUNY
f5b9b772d8 Made en-US more consistent 2019-04-28 15:11:45 +02:00
Florian CUNY
2eb0d657b4 Fixed typo in en-US locale 2019-04-28 14:40:28 +02:00
tastybento
8a885eac7f Refactor of clipboard to separate out file saving/loading (#641)
* Refactor of clipboard to separate out file saving/loading

There's now a clipboard manager to handle file system loading and saving
so that the clipboard works purely in blocks (YAML).

* Fixes a few bugs

* Renamed getClipBoard to getClipboard
2019-04-28 13:41:24 +02:00
Florian CUNY
6100420bae Added better success messages to admin team commands
#630
2019-04-28 11:21:58 +02:00
Florian CUNY
f333cfbe6f Added [name] textvariable to admin setowner command 'already-owner' message 2019-04-28 11:15:26 +02:00
Florian CUNY
722f136e3f Added better success message to AdminTeamKickCommand
#630
2019-04-28 10:39:31 +02:00
Florian CUNY
a612f20af9 Removed useless empty strings from en-US locale 2019-04-28 10:23:16 +02:00
Florian CUNY
3ef6529c40 Added better success messages for admin deaths and island team kick commands
#630
2019-04-28 10:21:35 +02:00
Florian CUNY
8ba0ebd170 Added better success feedback messages for IslandBanCommand and IslandUnbanCommand
#630
2019-04-27 21:03:40 +02:00