Commit Graph

57 Commits

Author SHA1 Message Date
Huynh Tien
e3b99195ca
Optimize safe location searching with configurable range limit (#1892)
* better safe spot finder

* this should be better

* limit how far the y-coordinate will be expanded

* load chunks passively
2021-12-20 09:44:34 -08:00
tastybento
09bac48b5e Adjusted portal search radius to 64. 2021-04-25 09:35:45 -07:00
tastybento
33b49a2349 Set minimum portal search radius to 8. Added config option.
https://github.com/BentoBoxWorld/BentoBox/issues/1747
2021-04-24 08:45:05 -07:00
BONNe
79c3804603
Implements ability to use faster player head gatherer (relates to #1646). (#1679)
Adds 3 new BentoBox options:
- use-cache-server: option which allows to use mc-heads.net API for gathering player heads. It is a bit faster than Mojang API.
- heads-per-call: option which allows to specify how many heads will be requested at once per each API call.
- ticks-between-calls: option which allows to specify how many ticks should be waited until next API call.

All these options will allow much more faster player head gatherer.

Changes includes optimization for Mojang API too. For servers in online mode, HeadGetter will use Player UUID, instead of asking for UUID from API.
2021-02-16 15:57:04 -08:00
tastybento
98697b1686
Delete experiment (#1589)
* Try loading adjacent chunks, but too slow.

* NMS void delete

* Revert the extra chunk in IslandDeletion.

That was for another deletion approach.

* Added NMS abstraction.

* Debug

* Clearer code.

* Clarify exceptions
2020-12-19 10:29:26 -08:00
Florian CUNY
3550ab9e5b Release 1.14.1 2020-07-13 22:54:16 +02:00
BONNe
fa259611fe
Rework PlayerHead Getter. (#1446)
* Rework PlayerHead Getter.

Generate player head based on WebAPI (as it is faster) and GameProfile texture (require NMS).
Cache is suitable for storing into file format.
Add ability to add custom HeadCache object into local cache.
Add ability to modify cache keeping length.
Add ability to keep all, or just a single element into cache until server restart.

* Address issues/improvements suggested from review.

- config will store time in minutes.
- default value will be 1h.
2020-07-11 14:13:32 +02:00
Florian CUNY
93d03d3315 Release 1.14.0 2020-07-07 22:16:47 +02:00
Florian CUNY
c4e28b7937 Release 1.13.1 2020-05-02 02:13:45 +02:00
Clément P
6a28ba0b1d
Add support for MongoDB URI (#1330)
Implements #1311
2020-05-01 21:28:52 +02:00
Florian CUNY
a764e9e232 Release 1.13.0 2020-05-01 18:14:03 +02:00
tastybento
85d5a3a6ac
Adds a single character prefix to database tables (#1278)
* Adds a single character prefix to database tables

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

* Fix tests

* Fix bug with substring
2020-04-18 14:16:36 -07:00
Florian CUNY
5c9cb4b4a4 Release 1.12.0 2020-03-21 13:10:51 +01:00
BONNe
f111bb9244
Implement option to enable SSL connection for MongoDB, MariaDB, MySQL and PostgreSQL connectors. (#1206) 2020-03-08 19:35:31 -07:00
Florian CUNY
273893c227 Release 1.11.1 2020-02-15 11:15:33 +01:00
Florian CUNY
c0a7b89722 Release 1.11.0 2020-01-26 13:46:46 +01:00
tastybento
5ab5954f47
Postgres implementation (#1142)
* WIP for https://github.com/BentoBoxWorld/BentoBox/issues/1093

* JSON based PostGresql

* Completes PostgreSQL suport

* Changed Postgres connector comments

* Put back rest of Postgres jdbc URL

* Update PostgreSQLDatabaseHandler.java
2020-01-23 07:56:30 -08:00
tastybento
6ac51453a0 Removed Postgres DB from config until it is implemented.
Put minimum version numbers into config for databases.
https://github.com/BentoBoxWorld/BentoBox/issues/1149
2020-01-21 13:29:51 -08:00
Florian CUNY
304533ee13 Release 1.10.0 2020-01-03 13:47:41 +01:00
Florian CUNY
ba0f7defcc Release 1.9.2 2019-12-14 11:49:28 +01:00
Florian CUNY
a5f5ac7cf6 Release 1.9.0 2019-12-01 14:10:18 +01:00
tastybento
2f4dae52e4 Changes island deletion loop to per second.
Previous setting was per tick, and the lowest value of 1 was set in the
config. By changing to per second, this value can be increased if
required. In testing, I see that smaller servers cannot cope even with a
setting of 1 per tick so I made this change. Also, island deletion can
occur slowly without issue.
2019-11-16 09:55:16 -08:00
Florian CUNY
ca6f344c70 Improved the configuration file introduction 2019-10-30 14:15:33 +01:00
Florian CUNY
cc3d5f33cc Release 1.8.0 2019-10-20 15:15:18 +02:00
tastybento
6f96f47ae5 Adds invites to trust and coop (#971)
Implements https://github.com/BentoBoxWorld/BentoBox/issues/800

* WIP

* Generic invites for team, coop and trusting.

Needs play testing.

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

* Fixed tests and added handling in trust and coop commands

* Completes invite, trust and coops command and tests.

* Minor documentation/settings improvements

* Renamed InviteType to Invite.Type

* Fixed compilation error
2019-10-13 09:28:49 +02:00
Florian CUNY
f4f33bbb72 Release 1.7.0 2019-09-08 16:22:14 +02:00
tastybento
f9a5f05987 Adds a delete speed option to BentoBox's config.yml
Reduces the chunk regen speed to 1 chunk per tick or 3 chunks/tick if
there is a nether and end world.
2019-08-31 17:13:19 -07:00
Florian CUNY
57ee8ef48e Release 1.6.0 2019-08-14 10:11:57 +02:00
tastybento
e99f84f7c7 Prevents named mobs from being cleared on teleport.
Adds a setting in BentoBox config to set the clear radius.
Adds defensive code to avoid clearing mobs in non game worlds.

https://github.com/BentoBoxWorld/BentoBox/issues/847
https://github.com/BentoBoxWorld/BentoBox/issues/819
2019-07-18 21:58:16 -07: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
060c602009
Makes command ranks a protection setting (#823) 2019-07-08 20:02:58 -07:00
BONNe
94a884b425 Added more transition databases (#794)
Fixes #793

Add missing database transitions from YAML to MongoDB and SQLite.
Add missing database transitions from JSON to MongoDB and SQLite.
Add database transitions from SQLite to JSON.
Add database transitions from MongoDB to JSON.
Add database transitions from MariaDB to JSON.
2019-06-28 15:42:01 +02:00
Florian CUNY
e7133b2176
Added SQLite database (#791)
* Added SQLite database
#570

* Makes SQLite work. Added config.yml option.

Tested on SQLite 3.24.0 2018-06-04 14:10:15
95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cbaapl

* Fix mariaDB test for close.

* Added test to MySQLDatabaseConnector and Handler
2019-06-28 08:33:43 +02:00
Florian CUNY
dffabd4933 Release 1.5.3 2019-06-21 18:46:17 +02:00
Florian CUNY
35a8aab145 Release 1.5.2 2019-06-16 11:24:27 +02:00
Florian CUNY
69a477a678 Version 1.5.1 2019-06-10 09:40:43 +02:00
Florian CUNY
8e262fa933 Release 1.5.0
Finally!
2019-06-09 09:37:46 +02: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
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
Florian CUNY
f5df341212 Removed 'web.github.flush-data-to-files' from config 2019-04-21 10:34:48 +02:00
Florian CUNY
8fcbdc716e Un-hid 'web.github.connection-interval' in config.yml 2019-04-20 12:01:29 +02:00
Florian CUNY
d1732e4f20 un-hid 2 GitHub-related settings in config 2019-04-19 18:49:47 +02:00
Florian CUNY
4d8bb71354 Release 1.4.0 2019-03-28 20:40:37 +01:00
Florian CUNY
d34caf6546 Version 1.3.1 2019-03-01 21:14:44 +01:00
Florian CUNY
ec75133d54 Version 1.3.0 2019-02-22 11:25:39 +01:00
Florian CUNY
384cbf31a7 Version 1.2.1 2019-02-02 14:15:16 +01:00
Florian CUNY
6fdf11f91e Version 1.2.0 🎉 2019-01-27 10:24:01 +01:00
Florian CUNY
bb188cb8ff Release 1.1 2019-01-20 10:10:29 +01:00
tastybento
044c67ea28 Fixes bug with concurrent saving of files to the database.
Implemented a FIFO to queue async save requests for YAML and MySQL.

The assumption is that most database objects will be held in memory
because the ordering of object loading is not handled. That means that
it is theoretically possible to load something on the main thread before
it has been saved in the async thread if you are really quick. So, in
general, you should load objects once and ideally never load them again
unless there's a big span of time in between so the async can finish.
For most situations, this race condition should not occur, but I'm just
warning about it.

Saving on shutdown is not async and takes as long as it takes.

Also added some defensive code to disable the plugin if the database
connection info is wrong and print an error message instead of lots of
errors.

Changed CleanSuperFlatListener to use a LinkedList for its queue.
2019-01-13 22:17:36 -08:00
Florian CUNY
2b0ccb4099 Release 1.0 ( 🎉 ) 2019-01-03 20:53:18 +01:00