public class Config extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
allow_broken_items
Whether players are allowed to sell/buy broken items
|
boolean |
allow_decimals_in_price
Whether prices may contain decimals
|
boolean |
append_potion_level_to_item_name
Whether the extension of a potion or tipped arrow (if available) should be appended to the item name.
|
boolean |
auto_calculate_item_amount
Whether the item amount should be calculated to fit the available money or inventory space
|
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_ping_interval
The interval in seconds, a ping is sent to the MySQL server
|
int |
database_mysql_port
The port used for ShopChest's MySQL database
|
String |
database_mysql_username
The username used in ShopChest's MySQL database
|
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 |
enable_debug_log
Whether the debug log file should be created
|
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
|
double |
maximal_item_distance
The maximum distance between a player and a shop to see the shop item
|
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
|
double |
two_line_hologram_lift
Amount the hologram should be lifted
|
boolean |
two_line_prices
Whether the buy- and sell price should be arranged below each other
|
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_mysql_ping_interval
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 allow_decimals_in_price
public boolean buy_greater_or_equal_sell
public boolean hopper_protection
public boolean explosion_protection
public boolean enable_debug_log
public boolean exclude_admin_shops
public boolean two_line_prices
public boolean append_potion_level_to_item_name
public boolean show_shop_items
public boolean allow_broken_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 boolean auto_calculate_item_amount
public double two_line_hologram_lift
public double maximal_distance
public double maximal_item_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.