public class Config extends Object
Modifier and Type | Field and Description |
---|---|
int |
auto_reload_time
The time between automatic shop reloads (if set to 0, the timer will be disabled)
|
List<String> |
blacklist
List containing items, of which players can't create a shop
If this list contains an item (e.g "STONE", "STONE:1"), it's in the blacklist.
|
boolean |
buy_greater_or_equal_sell
Whether the buy price of a shop must be greater than or equal the sell price
|
String |
database_mysql_database
The database used for ShopChest's MySQL database
|
String |
database_mysql_host
The hostname used in ShopChest's MySQL database
|
String |
database_mysql_password
The password used in ShopChest's MySQL database
|
int |
database_mysql_port
The port used for ShopChest's MySQL database
|
String |
database_mysql_username
The username used in ShopChest's MySQL database
|
int |
database_reconnect_attempts
The amount of attempts, ShopChest tries to reconnect to the database, when the connection is lost, until giving up
|
Database.DatabaseType |
database_type
The database type used for ShopChest.
|
int |
default_limit
The default shop limit for players and groups that are not listed in
shopLimits_player or in shopLimits_group |
boolean |
exclude_admin_shops
Whether admin shops should be excluded of the shop limits
|
boolean |
explosion_protection
Whether shops should be protected by explosions
|
boolean |
hopper_protection
Whether shops should be protected by hoppers
|
String |
language_file
The language file to use (e.g en_US, de_DE)
|
String |
main_command_name
The main command of ShopChest (default: shop)
|
double |
maximal_distance
The maximum distance between a player and a shop to see the hologram
|
Set<String> |
minimum_prices
The minimum prices for certain items
This returns a key set, which contains e.g "STONE", "STONE:1", of the minimum-prices section in ShopChest's config.
|
boolean |
remove_shop_on_error
Whether shops should automatically be removed from the database if an error occurred while loading
(e.g. when no chest is found at a shop's location)
|
double |
shop_creation_price_admin
The price a player has to pay in order to create an admin shop
|
double |
shop_creation_price_normal
The price a player has to pay in order to create a normal shop
|
Set<String> |
shopLimits_group
The shop limits of certain groups
This returns a key set, which contains the group names, of the shop-limits.group section in ShopChest's config.
|
Set<String> |
shopLimits_player
The shop limits of certain players
This returns a key set, which contains the player names, of the shop-limits.player section in ShopChest's config.
|
boolean |
show_shop_items
Whether the shop items should be shown
|
Modifier and Type | Method and Description |
---|---|
void |
add(String property,
String value)
Add a value to a list in the config.yml.
|
LanguageConfiguration |
getLanguageConfig() |
void |
reload(boolean firstLoad,
boolean langReload)
Reload the configuration values from config.yml
|
void |
remove(String property,
String value) |
void |
set(String property,
String value)
Set a configuration value
Config is automatically reloaded
|
public String database_mysql_host
public int database_mysql_port
public String database_mysql_database
public String database_mysql_username
public String database_mysql_password
public Database.DatabaseType database_type
public int database_reconnect_attempts
public Set<String> minimum_prices
The minimum prices for certain items
This returns a key set, which contains e.g "STONE", "STONE:1", of the minimum-prices section in ShopChest's config. To actually retrieve the price for an item, you have to get the Double minimum-prices.key.public Set<String> shopLimits_group
The shop limits of certain groups
This returns a key set, which contains the group names, of the shop-limits.group section in ShopChest's config. To actually retrieve the limits for a group, you have to get the Integer shop-limits.group.key.public Set<String> shopLimits_player
The shop limits of certain players
This returns a key set, which contains the player names, of the shop-limits.player section in ShopChest's config. To actually retrieve the limits for a player, you have to get the Integer shop-limits.player.key.public List<String> blacklist
List containing items, of which players can't create a shop
If this list contains an item (e.g "STONE", "STONE:1"), it's in the blacklist.public boolean buy_greater_or_equal_sell
public boolean hopper_protection
public boolean explosion_protection
public boolean exclude_admin_shops
public boolean show_shop_items
public boolean remove_shop_on_error
Whether shops should automatically be removed from the database if an error occurred while loading
(e.g. when no chest is found at a shop's location)public double maximal_distance
public double shop_creation_price_normal
public double shop_creation_price_admin
public int default_limit
shopLimits_player
or in shopLimits_group
public int auto_reload_time
public String main_command_name
public String language_file
public Config(ShopChest plugin)
public void set(String property, String value)
Set a configuration value
Config is automatically reloadedproperty
- Property to changevalue
- Value to setpublic void add(String property, String value)
property
- Location of the listvalue
- Value to addpublic void reload(boolean firstLoad, boolean langReload)
public LanguageConfiguration getLanguageConfig()
LanguageConfiguration
Copyright © 2016. All rights reserved.