2018-07-31 18:03:32 +02:00
package world.bentobox.bentobox ;
2018-07-29 22:21:46 +02:00
2019-07-05 01:54:05 +02:00
import java.util.HashSet ;
import java.util.Set ;
2018-07-31 18:03:32 +02:00
import world.bentobox.bentobox.api.configuration.ConfigComment ;
import world.bentobox.bentobox.api.configuration.ConfigEntry ;
2019-05-08 21:15:22 +02:00
import world.bentobox.bentobox.api.configuration.ConfigObject ;
2018-07-31 18:03:32 +02:00
import world.bentobox.bentobox.api.configuration.StoreAt ;
2018-08-06 15:19:06 +02:00
import world.bentobox.bentobox.database.DatabaseSetup.DatabaseType ;
2018-07-29 22:21:46 +02:00
/ * *
* All the plugin settings are here
2019-01-01 20:54:19 +01:00
* @author tastybento
2018-07-29 22:21:46 +02:00
* /
@StoreAt ( filename = " config.yml " ) // Explicitly call out what name this should have.
2019-10-30 14:15:33 +01:00
@ConfigComment ( " BentoBox v[version] configuration file. " )
@ConfigComment ( " " )
@ConfigComment ( " This configuration file contains settings that mainly apply to or manage the following elements: " )
@ConfigComment ( " * Data storage " )
@ConfigComment ( " * Gamemodes (commands, ...) " )
2020-03-18 08:32:35 +01:00
@ConfigComment ( " * Internet connectivity (web-based content-enriched features, ...) " )
2019-10-30 14:15:33 +01:00
@ConfigComment ( " " )
@ConfigComment ( " Note that this configuration file is dynamic: " )
@ConfigComment ( " * It gets updated with the newest settings and comments after BentoBox loaded its settings from it. " )
@ConfigComment ( " * Upon updating BentoBox, new settings will be automatically added into this configuration file. " )
@ConfigComment ( " * Said settings are distinguishable by a dedicated comment, which looks like this: " )
@ConfigComment ( " Added since X.Y.Z. " )
@ConfigComment ( " * They are provided with default values that should not cause issues on live production servers. " )
@ConfigComment ( " * You can however edit this file while the server is online. " )
@ConfigComment ( " You will therefore need to run the following command in order to take the changes into account: /bentobox reload. " )
@ConfigComment ( " " )
@ConfigComment ( " Here are a few pieces of advice before you get started: " )
@ConfigComment ( " * You should check out our Wiki, which may provide you useful tips or insights about BentoBox's features. " )
@ConfigComment ( " Link: https://github.com/BentoBoxWorld/BentoBox/wiki " )
@ConfigComment ( " * You should edit this configuration file while the server is offline. " )
@ConfigComment ( " * Moreover, whenever you update BentoBox, you should do so on a test server first. " )
@ConfigComment ( " This will allow you to configure the new settings beforehand instead of applying them inadvertently on a live production server. " )
2019-05-08 21:15:22 +02:00
public class Settings implements ConfigObject {
2018-07-29 22:21:46 +02:00
/* GENERAL */
@ConfigComment ( " Default language for new players. " )
@ConfigComment ( " This is the filename in the locale folder without .yml. " )
@ConfigComment ( " If this does not exist, the default en-US will be used. " )
@ConfigEntry ( path = " general.default-language " )
private String defaultLanguage = " en-US " ;
2020-01-25 09:37:29 +01:00
@ConfigComment ( " Use economy or not. If true, an economy plugin is required. If false, no money is used or given. " )
2018-07-29 22:21:46 +02:00
@ConfigComment ( " If there is no economy plugin present anyway, money will be automatically disabled. " )
@ConfigEntry ( path = " general.use-economy " )
private boolean useEconomy = true ;
// Database
2020-01-23 16:56:30 +01:00
@ConfigComment ( " JSON, MYSQL, MARIADB, MONGODB, SQLITE, POSTGRESQL and YAML(deprecated). " )
2019-05-08 21:15:22 +02:00
@ConfigComment ( " Transition database options are: " )
2019-06-28 15:42:01 +02:00
@ConfigComment ( " YAML2JSON, YAML2MARIADB, YAML2MYSQL, YAML2MONGODB, YAML2SQLITE " )
2020-01-23 16:56:30 +01:00
@ConfigComment ( " JSON2MARIADB, JSON2MYSQL, JSON2MONGODB, JSON2SQLITE, JSON2POSTGRESQL " )
2020-01-25 09:37:29 +01:00
@ConfigComment ( " MYSQL2JSON, MARIADB2JSON, MONGODB2JSON, SQLITE2JSON, POSTGRESQL2JSON " )
2019-05-08 21:15:22 +02:00
@ConfigComment ( " If you need others, please make a feature request. " )
2020-01-21 22:29:51 +01:00
@ConfigComment ( " Minimum required versions: " )
@ConfigComment ( " MySQL versions 5.7 or later " )
@ConfigComment ( " MariaDB versions 10.2.3 or later " )
@ConfigComment ( " MongoDB versions 3.6 or later " )
@ConfigComment ( " SQLite versions 3.28 or later " )
2020-01-23 16:56:30 +01:00
@ConfigComment ( " PostgreSQL versions 9.4 or later " )
2019-05-08 21:15:22 +02:00
@ConfigComment ( " Transition options enable migration from one database type to another. Use /bbox migrate. " )
@ConfigComment ( " YAML and JSON are file-based databases. " )
2019-01-13 10:05:24 +01:00
@ConfigComment ( " MYSQL might not work with all implementations: if available, use a dedicated database type (e.g. MARIADB). " )
2019-01-01 20:54:19 +01:00
@ConfigComment ( " If you use MONGODB, you must also run the BSBMongo plugin (not addon). " )
2018-10-28 16:51:51 +01:00
@ConfigComment ( " See https://github.com/tastybento/bsbMongo/releases/. " )
2019-06-18 15:26:19 +02:00
@ConfigEntry ( path = " general.database.type " , video = " https://youtu.be/FFzCk5-y7-g " )
2019-05-08 21:15:22 +02:00
private DatabaseType databaseType = DatabaseType . JSON ;
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " general.database.host " )
2018-08-31 11:06:37 +02:00
private String databaseHost = " localhost " ;
2018-07-29 22:21:46 +02:00
@ConfigComment ( " Port 3306 is MySQL's default. Port 27017 is MongoDB's default. " )
@ConfigEntry ( path = " general.database.port " )
2018-08-31 11:06:37 +02:00
private int databasePort = 3306 ;
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " general.database.name " )
2018-08-31 11:06:37 +02:00
private String databaseName = " bentobox " ;
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " general.database.username " )
2018-08-31 11:06:37 +02:00
private String databaseUsername = " username " ;
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " general.database.password " )
2018-08-31 11:06:37 +02:00
private String databasePassword = " password " ;
2018-07-29 22:21:46 +02:00
@ConfigComment ( " How often the data will be saved to file in mins. Default is 5 minutes. " )
@ConfigComment ( " This helps prevent issues if the server crashes. " )
@ConfigComment ( " Data is also saved at important points in the game. " )
@ConfigEntry ( path = " general.database.backup-period " )
private int databaseBackupPeriod = 5 ;
2020-03-21 10:45:44 +01:00
@ConfigComment ( " Enable SSL connection to MongoDB, MariaDB, MySQL and PostgreSQL databases. " )
2020-03-20 10:23:25 +01:00
@ConfigEntry ( path = " general.database.use-ssl " , since = " 1.12.0 " )
2020-03-09 03:35:31 +01:00
private boolean useSSL = false ;
2020-04-18 23:16:36 +02:00
@ConfigComment ( " Database table prefix character. Adds a prefix to the database tables. Not used by flatfile databases. " )
@ConfigComment ( " Only the characters A-Z, a-z, 0-9 can be used. Invalid characters will become an underscore. " )
@ConfigComment ( " Set this to a unique value if you are running multiple BentoBox instances that share a database. " )
@ConfigEntry ( path = " general.database.prefix-character " , since = " 1.13.0 " )
private String databasePrefix = " " ;
2020-05-01 21:28:52 +02:00
@ConfigComment ( " MongoDB client connection URI to override default connection options. " )
@ConfigComment ( " See: https://docs.mongodb.com/manual/reference/connection-string/ " )
@ConfigEntry ( path = " general.database.mongodb-connection-uri " , since = " 1.14.0 " )
private String mongodbConnectionUri = " " ;
2018-07-29 22:21:46 +02:00
@ConfigComment ( " Allow FTB Autonomous Activator to work (will allow a pseudo player [CoFH] to place and break blocks and hang items) " )
@ConfigComment ( " Add other fake player names here if required " )
2018-08-06 18:00:47 +02:00
@ConfigEntry ( path = " general.fakeplayers " , experimental = true )
2018-07-29 22:21:46 +02:00
private Set < String > fakePlayers = new HashSet < > ( ) ;
@ConfigEntry ( path = " panel.close-on-click-outside " )
private boolean closePanelOnClickOutside = true ;
2019-06-09 09:18:30 +02:00
/ *
* Logs
* /
2019-01-22 14:39:44 +01:00
@ConfigComment ( " Toggle whether superflat chunks regeneration should be logged in the server logs or not. " )
@ConfigComment ( " It can be spammy if there are a lot of superflat chunks to regenerate. " )
@ConfigComment ( " However, as superflat chunks regeneration can be performance-intensive, it is recommended to keep " )
@ConfigComment ( " this setting set to true, as it will help you know if there are regenerations taking place. " )
2019-01-27 09:23:23 +01:00
@ConfigEntry ( path = " logs.clean-super-flat-chunks " , since = " 1.2.0 " )
2019-01-22 14:39:44 +01:00
private boolean logCleanSuperFlatChunks = true ;
2019-06-09 09:18:30 +02:00
@ConfigComment ( " Toggle whether downloading data from GitHub should be logged in the server logs or not. " )
@ConfigEntry ( path = " logs.github-download-data " , since = " 1.5.0 " )
private boolean logGithubDownloadData = true ;
2018-07-29 22:21:46 +02:00
/ *
* Island
* /
2018-08-31 11:06:37 +02:00
// Cooldowns
2019-01-27 10:04:13 +01:00
@ConfigComment ( " How long a player must wait until they can rejoin a team island after being kicked in minutes. " )
@ConfigComment ( " This slows the effectiveness of players repeating challenges " )
2018-07-29 22:21:46 +02:00
@ConfigComment ( " by repetitively being invited to a team island. " )
2019-01-27 10:04:13 +01:00
@ConfigEntry ( path = " island.cooldown.time.invite " )
2018-08-31 11:06:37 +02:00
private int inviteCooldown = 60 ;
2018-09-02 15:06:46 +02:00
@ConfigComment ( " How long a player must wait until they can coop a player in minutes. " )
2019-01-27 10:04:13 +01:00
@ConfigEntry ( path = " island.cooldown.time.coop " )
2018-09-02 15:06:46 +02:00
private int coopCooldown = 5 ;
@ConfigComment ( " How long a player must wait until they can trust a player in minutes. " )
2019-01-27 10:04:13 +01:00
@ConfigEntry ( path = " island.cooldown.time.trust " )
2018-09-02 15:06:46 +02:00
private int trustCooldown = 5 ;
2019-01-27 09:59:31 +01:00
@ConfigComment ( " How long a player must wait until they can ban a player after unbanning them. In minutes. " )
2019-01-27 10:04:13 +01:00
@ConfigEntry ( path = " island.cooldown.time.ban " )
2018-08-31 11:06:37 +02:00
private int banCooldown = 10 ;
@ConfigComment ( " How long a player must wait before they can reset their island again in seconds. " )
2019-01-27 10:04:13 +01:00
@ConfigEntry ( path = " island.cooldown.time.reset " )
2018-08-31 11:06:37 +02:00
private int resetCooldown = 300 ;
2018-07-29 22:21:46 +02:00
2019-01-27 10:10:25 +01:00
@ConfigComment ( " Whether the reset cooldown should be applied when the player creates an island for the first time or not. " )
@ConfigEntry ( path = " island.cooldown.options.set-reset-cooldown-on-create " , since = " 1.2.0 " )
private boolean resetCooldownOnCreate = true ;
2018-07-29 22:21:46 +02:00
// Timeout for team kick and leave commands
2019-01-27 09:59:31 +01:00
@ConfigComment ( " Time in seconds that players have to confirm sensitive commands, e.g. island reset. " )
2018-08-31 11:06:37 +02:00
@ConfigEntry ( path = " island.confirmation.time " )
private int confirmationTime = 10 ;
2019-07-14 07:32:09 +02:00
// Timeout for team kick and leave commands
@ConfigComment ( " Time in seconds that players have to stand still before teleport commands activate, e.g. island go. " )
@ConfigEntry ( path = " island.delay.time " )
private int delayTime = 0 ;
2018-07-29 22:21:46 +02:00
@ConfigComment ( " Ask the player to confirm the command he is using by typing it again. " )
2018-08-31 11:06:37 +02:00
@ConfigEntry ( path = " island.confirmation.commands.kick " )
2018-07-29 22:21:46 +02:00
private boolean kickConfirmation = true ;
2018-08-31 11:06:37 +02:00
@ConfigEntry ( path = " island.confirmation.commands.leave " )
2018-07-29 22:21:46 +02:00
private boolean leaveConfirmation = true ;
2018-08-31 11:06:37 +02:00
@ConfigEntry ( path = " island.confirmation.commands.reset " )
2018-07-29 22:21:46 +02:00
private boolean resetConfirmation = true ;
2019-10-13 09:28:49 +02:00
@ConfigComment ( " Ask the recipient to confirm trust or coop invites. " )
@ConfigComment ( " Team invites will always require confirmation, for safety concerns. " )
@ConfigEntry ( path = " island.confirmation.invites " , since = " 1.8.0 " )
private boolean inviteConfirmation = false ;
2019-08-28 13:45:38 +02:00
@ConfigComment ( " Sets the minimum length an island custom name is required to have. " )
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " island.name.min-length " )
private int nameMinLength = 4 ;
2019-08-28 13:45:38 +02:00
@ConfigComment ( " Sets the maximum length an island custom name cannot exceed. " )
2018-07-29 22:21:46 +02:00
@ConfigEntry ( path = " island.name.max-length " )
private int nameMaxLength = 20 ;
2019-08-28 14:44:55 +02:00
@ConfigComment ( " Requires island custom names to be unique in the gamemode the island is in. " )
@ConfigComment ( " As a result, only one island per gamemode are allowed to share the same name. " )
@ConfigComment ( " Note that island names are purely cosmetics and are not used as a way to programmatically identify islands. " )
@ConfigEntry ( path = " island.name.uniqueness " , since = " 1.7.0 " )
private boolean nameUniqueness = false ;
2018-07-29 22:21:46 +02:00
2019-07-19 06:58:16 +02:00
@ConfigComment ( " Remove hostile mob on teleport box radius " )
@ConfigComment ( " If hostile mobs are cleared on player teleport, then this sized box will be cleared " )
@ConfigComment ( " around the player. e.g. 5 means a 10 x 10 x 10 box around the player " )
@ConfigComment ( " Be careful not to make this too big. Does not cover standard nether or end teleports. " )
2019-08-28 13:45:11 +02:00
@ConfigEntry ( path = " island.clear-radius " , since = " 1.6.0 " )
2019-07-19 06:58:16 +02:00
private int clearRadius = 5 ;
2019-09-08 15:35:00 +02:00
@ConfigComment ( " Number of blocks to paste per tick when pasting blueprints. " )
@ConfigComment ( " Smaller values will help reduce noticeable lag but will make pasting take slightly longer. " )
@ConfigComment ( " On the contrary, greater values will make pasting take less time, but this benefit is quickly severely impacted by the " )
@ConfigComment ( " resulting amount of chunks that must be loaded to fulfill the process, which often causes the server to hang out. " )
2018-12-31 03:09:56 +01:00
@ConfigEntry ( path = " island.paste-speed " )
2019-12-01 12:11:12 +01:00
private int pasteSpeed = 64 ;
2018-12-31 03:09:56 +01:00
2019-11-16 18:55:16 +01:00
@ConfigComment ( " Island deletion: Number of chunks per world to regenerate per second. " )
@ConfigComment ( " If there is a nether and end then 3x this number will be regenerated per second. " )
2019-09-01 02:13:19 +02:00
@ConfigComment ( " Smaller values will help reduce noticeable lag but will make deleting take longer. " )
@ConfigComment ( " A setting of 0 will leave island blocks (not recommended). " )
2019-09-08 15:12:50 +02:00
@ConfigEntry ( path = " island.delete-speed " , since = " 1.7.0 " )
2019-09-08 15:35:00 +02:00
private int deleteSpeed = 1 ;
2019-09-01 02:13:19 +02:00
2019-01-02 23:02:52 +01:00
// Automated ownership transfer
@ConfigComment ( " Toggles the automated ownership transfer. " )
@ConfigComment ( " It automatically transfers the ownership of an island to one of its members in case the current owner is inactive. " )
@ConfigComment ( " More precisely, it transfers the ownership of the island to the player who's active, whose rank is the highest " )
@ConfigComment ( " and who's been part of the island the longest time. " )
@ConfigComment ( " Setting this to 'false' will disable the feature. " )
2019-01-03 17:22:20 +01:00
@ConfigEntry ( path = " island.automated-ownership-transfer.enable " , hidden = true )
2019-01-03 20:26:26 +01:00
private boolean enableAutoOwnershipTransfer = false ;
2019-01-02 23:02:52 +01:00
@ConfigComment ( " Time in days since the island owner's last disconnection before they are considered inactive. " )
2019-01-03 17:22:20 +01:00
@ConfigEntry ( path = " island.automated-ownership-transfer.inactivity-threshold " , hidden = true )
2019-01-02 23:02:52 +01:00
private int autoOwnershipTransferInactivityThreshold = 30 ;
@ConfigComment ( " Ranks are being considered when transferring the island ownership to one of its member. " )
@ConfigComment ( " Ignoring ranks will result in the island ownership being transferred to the player who's active and " )
@ConfigComment ( " who's been member of the island the longest time. " )
2019-01-03 17:22:20 +01:00
@ConfigEntry ( path = " island.automated-ownership-transfer.ignore-ranks " , hidden = true )
2019-01-02 23:02:52 +01:00
private boolean autoOwnershipTransferIgnoreRanks = false ;
2020-04-20 17:20:12 +02:00
// Island deletion related settings
@ConfigComment ( " Toggles whether islands, when players are resetting them, should be kept in the world or deleted. " )
@ConfigComment ( " * If set to 'true', whenever a player resets his island, his previous island will become unowned and won't be deleted from the world. " )
@ConfigComment ( " You can, however, still delete those unowned islands through purging. " )
@ConfigComment ( " On bigger servers, this can lead to an increasing world size. " )
@ConfigComment ( " Yet, this allows admins to retrieve a player's old island in case of an improper use of the reset command. " )
@ConfigComment ( " Admins can indeed re-add the player to his old island by registering him to it. " )
@ConfigComment ( " * If set to 'false', whenever a player resets his island, his previous island will be deleted from the world. " )
@ConfigComment ( " This is the default behaviour. " )
@ConfigEntry ( path = " island.deletion.keep-previous-island-on-reset " , since = " 1.13.0 " )
private boolean keepPreviousIslandOnReset = false ;
2019-02-21 10:39:06 +01:00
/* WEB */
2019-02-21 10:53:01 +01:00
@ConfigComment ( " Toggle whether BentoBox can connect to GitHub to get data about updates and addons. " )
@ConfigComment ( " Disabling this will result in the deactivation of the update checker and of some other " )
@ConfigComment ( " features that rely on the data downloaded from the GitHub API. " )
@ConfigComment ( " It does not send any data. " )
2019-04-19 18:49:47 +02:00
@ConfigEntry ( path = " web.github.download-data " , since = " 1.5.0 " )
private boolean githubDownloadData = true ;
2019-02-21 10:53:01 +01:00
2019-02-21 11:17:39 +01:00
@ConfigComment ( " Time in minutes between each connection to the GitHub API. " )
@ConfigComment ( " This allows for up-to-the-minute information gathering. " )
2019-06-30 08:56:38 +02:00
@ConfigComment ( " However, as the GitHub API data does not get updated instantly, this value cannot be set to less than 60 minutes. " )
2019-02-21 11:17:39 +01:00
@ConfigComment ( " Setting this to 0 will make BentoBox download data only at startup. " )
2019-04-20 12:01:29 +02:00
@ConfigEntry ( path = " web.github.connection-interval " , since = " 1.5.0 " )
2019-06-30 08:56:38 +02:00
private int githubConnectionInterval = 120 ;
2019-02-21 11:17:39 +01:00
2019-02-22 10:03:04 +01:00
@ConfigEntry ( path = " web.updater.check-updates.bentobox " , since = " 1.3.0 " , hidden = true )
2019-02-21 11:17:39 +01:00
private boolean checkBentoBoxUpdates = true ;
2019-02-22 10:03:04 +01:00
@ConfigEntry ( path = " web.updater.check-updates.addons " , since = " 1.3.0 " , hidden = true )
2019-02-21 11:17:39 +01:00
private boolean checkAddonsUpdates = true ;
2019-10-30 14:15:33 +01:00
// ---------------------------------------------
2018-08-31 11:06:37 +02:00
// Getters and setters
2018-07-29 22:21:46 +02:00
public String getDefaultLanguage ( ) {
return defaultLanguage ;
}
2018-08-31 11:06:37 +02:00
public void setDefaultLanguage ( String defaultLanguage ) {
this . defaultLanguage = defaultLanguage ;
}
2018-07-29 22:21:46 +02:00
public boolean isUseEconomy ( ) {
return useEconomy ;
}
2018-08-31 11:06:37 +02:00
public void setUseEconomy ( boolean useEconomy ) {
this . useEconomy = useEconomy ;
2018-07-29 22:21:46 +02:00
}
public DatabaseType getDatabaseType ( ) {
return databaseType ;
}
2018-08-31 11:06:37 +02:00
public void setDatabaseType ( DatabaseType databaseType ) {
this . databaseType = databaseType ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public String getDatabaseHost ( ) {
return databaseHost ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setDatabaseHost ( String databaseHost ) {
this . databaseHost = databaseHost ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public int getDatabasePort ( ) {
return databasePort ;
2018-07-29 22:21:46 +02:00
}
2020-03-09 03:35:31 +01:00
/ * *
* This method returns the useSSL value .
* @return the value of useSSL .
* @since 1 . 12 . 0
* /
public boolean isUseSSL ( ) {
return useSSL ;
}
/ * *
* This method sets the useSSL value .
* @param useSSL the useSSL new value .
* @since 1 . 12 . 0
* /
public void setUseSSL ( boolean useSSL ) {
this . useSSL = useSSL ;
}
2018-08-31 11:06:37 +02:00
public void setDatabasePort ( int databasePort ) {
this . databasePort = databasePort ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public String getDatabaseName ( ) {
return databaseName ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setDatabaseName ( String databaseName ) {
this . databaseName = databaseName ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public String getDatabaseUsername ( ) {
return databaseUsername ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setDatabaseUsername ( String databaseUsername ) {
this . databaseUsername = databaseUsername ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public String getDatabasePassword ( ) {
return databasePassword ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setDatabasePassword ( String databasePassword ) {
this . databasePassword = databasePassword ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public int getDatabaseBackupPeriod ( ) {
return databaseBackupPeriod ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setDatabaseBackupPeriod ( int databaseBackupPeriod ) {
this . databaseBackupPeriod = databaseBackupPeriod ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public Set < String > getFakePlayers ( ) {
return fakePlayers ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setFakePlayers ( Set < String > fakePlayers ) {
this . fakePlayers = fakePlayers ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public boolean isClosePanelOnClickOutside ( ) {
return closePanelOnClickOutside ;
2018-07-29 22:21:46 +02:00
}
public void setClosePanelOnClickOutside ( boolean closePanelOnClickOutside ) {
this . closePanelOnClickOutside = closePanelOnClickOutside ;
}
2018-08-31 11:06:37 +02:00
public int getInviteCooldown ( ) {
return inviteCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setInviteCooldown ( int inviteCooldown ) {
this . inviteCooldown = inviteCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-09-02 15:06:46 +02:00
public int getCoopCooldown ( ) {
return coopCooldown ;
}
public void setCoopCooldown ( int coopCooldown ) {
this . coopCooldown = coopCooldown ;
}
public int getTrustCooldown ( ) {
return trustCooldown ;
}
public void setTrustCooldown ( int trustCooldown ) {
this . trustCooldown = trustCooldown ;
}
2018-08-31 11:06:37 +02:00
public int getBanCooldown ( ) {
return banCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setBanCooldown ( int banCooldown ) {
this . banCooldown = banCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public int getResetCooldown ( ) {
return resetCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setResetCooldown ( int resetCooldown ) {
this . resetCooldown = resetCooldown ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public int getConfirmationTime ( ) {
return confirmationTime ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public void setConfirmationTime ( int confirmationTime ) {
this . confirmationTime = confirmationTime ;
2018-07-29 22:21:46 +02:00
}
2018-08-31 11:06:37 +02:00
public boolean isKickConfirmation ( ) {
return kickConfirmation ;
2018-07-29 22:21:46 +02:00
}
public void setKickConfirmation ( boolean kickConfirmation ) {
this . kickConfirmation = kickConfirmation ;
}
2018-08-31 11:06:37 +02:00
public boolean isLeaveConfirmation ( ) {
return leaveConfirmation ;
2018-07-29 22:21:46 +02:00
}
public void setLeaveConfirmation ( boolean leaveConfirmation ) {
this . leaveConfirmation = leaveConfirmation ;
}
public boolean isResetConfirmation ( ) {
return resetConfirmation ;
}
public void setResetConfirmation ( boolean resetConfirmation ) {
this . resetConfirmation = resetConfirmation ;
}
public int getNameMinLength ( ) {
return nameMinLength ;
}
public void setNameMinLength ( int nameMinLength ) {
this . nameMinLength = nameMinLength ;
}
2018-08-31 11:06:37 +02:00
public int getNameMaxLength ( ) {
return nameMaxLength ;
2018-08-05 06:10:51 +02:00
}
2018-08-31 11:06:37 +02:00
public void setNameMaxLength ( int nameMaxLength ) {
this . nameMaxLength = nameMaxLength ;
2018-08-05 06:10:51 +02:00
}
2019-08-28 14:44:55 +02:00
/ * *
* @since 1 . 7 . 0
* /
public boolean isNameUniqueness ( ) {
return nameUniqueness ;
}
/ * *
* @since 1 . 7 . 0
* /
public void setNameUniqueness ( boolean nameUniqueness ) {
this . nameUniqueness = nameUniqueness ;
}
2018-12-31 03:09:56 +01:00
/ * *
* @param pasteSpeed the pasteSpeed to set
* /
public void setPasteSpeed ( int pasteSpeed ) {
this . pasteSpeed = pasteSpeed ;
}
/ * *
* @return paste speed in blocks per tick
* /
public int getPasteSpeed ( ) {
return this . pasteSpeed ;
}
2019-09-01 02:13:19 +02:00
/ * *
* @return the deleteSpeed
* @since 1 . 7 . 0
* /
public int getDeleteSpeed ( ) {
return deleteSpeed ;
}
/ * *
* @param deleteSpeed the deleteSpeed to set
* @since 1 . 7 . 0
* /
public void setDeleteSpeed ( int deleteSpeed ) {
this . deleteSpeed = deleteSpeed ;
}
2019-01-02 23:02:52 +01:00
public boolean isEnableAutoOwnershipTransfer ( ) {
return enableAutoOwnershipTransfer ;
}
public void setEnableAutoOwnershipTransfer ( boolean enableAutoOwnershipTransfer ) {
this . enableAutoOwnershipTransfer = enableAutoOwnershipTransfer ;
}
public int getAutoOwnershipTransferInactivityThreshold ( ) {
return autoOwnershipTransferInactivityThreshold ;
}
public void setAutoOwnershipTransferInactivityThreshold ( int autoOwnershipTransferInactivityThreshold ) {
this . autoOwnershipTransferInactivityThreshold = autoOwnershipTransferInactivityThreshold ;
}
public boolean isAutoOwnershipTransferIgnoreRanks ( ) {
return autoOwnershipTransferIgnoreRanks ;
}
public void setAutoOwnershipTransferIgnoreRanks ( boolean autoOwnershipTransferIgnoreRanks ) {
this . autoOwnershipTransferIgnoreRanks = autoOwnershipTransferIgnoreRanks ;
}
2019-01-22 14:39:44 +01:00
public boolean isLogCleanSuperFlatChunks ( ) {
return logCleanSuperFlatChunks ;
}
public void setLogCleanSuperFlatChunks ( boolean logCleanSuperFlatChunks ) {
this . logCleanSuperFlatChunks = logCleanSuperFlatChunks ;
}
2019-01-27 10:10:25 +01:00
public boolean isResetCooldownOnCreate ( ) {
return resetCooldownOnCreate ;
}
public void setResetCooldownOnCreate ( boolean resetCooldownOnCreate ) {
this . resetCooldownOnCreate = resetCooldownOnCreate ;
}
2019-02-21 10:53:01 +01:00
public boolean isGithubDownloadData ( ) {
return githubDownloadData ;
}
public void setGithubDownloadData ( boolean githubDownloadData ) {
this . githubDownloadData = githubDownloadData ;
}
2019-02-21 11:17:39 +01:00
public int getGithubConnectionInterval ( ) {
return githubConnectionInterval ;
}
public void setGithubConnectionInterval ( int githubConnectionInterval ) {
this . githubConnectionInterval = githubConnectionInterval ;
}
public boolean isCheckBentoBoxUpdates ( ) {
return checkBentoBoxUpdates ;
}
public void setCheckBentoBoxUpdates ( boolean checkBentoBoxUpdates ) {
this . checkBentoBoxUpdates = checkBentoBoxUpdates ;
}
public boolean isCheckAddonsUpdates ( ) {
return checkAddonsUpdates ;
}
public void setCheckAddonsUpdates ( boolean checkAddonsUpdates ) {
this . checkAddonsUpdates = checkAddonsUpdates ;
}
2019-06-09 09:18:30 +02:00
public boolean isLogGithubDownloadData ( ) {
return logGithubDownloadData ;
}
public void setLogGithubDownloadData ( boolean logGithubDownloadData ) {
this . logGithubDownloadData = logGithubDownloadData ;
}
2019-07-14 07:32:09 +02:00
public int getDelayTime ( ) {
return delayTime ;
}
/ * *
* @param delayTime the delayTime to set
* /
public void setDelayTime ( int delayTime ) {
this . delayTime = delayTime ;
}
2019-07-19 06:58:16 +02:00
/ * *
* @return the clearRadius
* /
public int getClearRadius ( ) {
if ( clearRadius < 0 ) clearRadius = 0 ;
return clearRadius ;
}
/ * *
* @param clearRadius the clearRadius to set . Cannot be negative .
* /
public void setClearRadius ( int clearRadius ) {
if ( clearRadius < 0 ) clearRadius = 0 ;
this . clearRadius = clearRadius ;
}
2019-10-13 09:28:49 +02:00
/ * *
* @return the inviteConfirmation
* @since 1 . 8 . 0
* /
public boolean isInviteConfirmation ( ) {
return inviteConfirmation ;
}
2019-07-19 06:58:16 +02:00
2019-10-13 09:28:49 +02:00
/ * *
* @param inviteConfirmation the inviteConfirmation to set
* @since 1 . 8 . 0
* /
public void setInviteConfirmation ( boolean inviteConfirmation ) {
this . inviteConfirmation = inviteConfirmation ;
}
2020-04-18 23:16:36 +02:00
/ * *
* @return the databasePrefix
* /
public String getDatabasePrefix ( ) {
if ( databasePrefix = = null ) databasePrefix = " " ;
return databasePrefix . isEmpty ( ) ? " " : databasePrefix . replaceAll ( " [^a-zA-Z0-9] " , " _ " ) . substring ( 0 , 1 ) ;
}
/ * *
* @param databasePrefix the databasePrefix to set
* /
public void setDatabasePrefix ( String databasePrefix ) {
this . databasePrefix = databasePrefix ;
}
2020-04-20 17:20:12 +02:00
/ * *
* Returns whether islands , when reset , should be kept or deleted .
* @return { @code true } if islands , when reset , should be kept ; { @code false } otherwise .
* @since 1 . 13 . 0
* /
public boolean isKeepPreviousIslandOnReset ( ) {
return keepPreviousIslandOnReset ;
}
/ * *
* Sets whether islands , when reset , should be kept or deleted .
* @param keepPreviousIslandOnReset { @code true } if islands , when reset , should be kept ; { @code false } otherwise .
* @since 1 . 13 . 0
* /
public void setKeepPreviousIslandOnReset ( boolean keepPreviousIslandOnReset ) {
this . keepPreviousIslandOnReset = keepPreviousIslandOnReset ;
}
2020-05-01 21:28:52 +02:00
/ * *
* Returns a MongoDB client connection URI to override default connection options .
*
* @return mongodb client connection .
* @see < a href = " https://docs.mongodb.com/manual/reference/connection-string/ " > MongoDB Documentation < / a >
* @since 1 . 14 . 0
* /
public String getMongodbConnectionUri ( ) {
return mongodbConnectionUri ;
}
/ * *
* Set the MongoDB client connection URI .
* @param mongodbConnectionUri connection URI .
* /
public void setMongodbConnectionUri ( String mongodbConnectionUri ) {
this . mongodbConnectionUri = mongodbConnectionUri ;
}
2019-10-13 09:28:49 +02:00
}