Class VoxelSniperConfig
java.lang.Object
com.thevoxelbox.voxelsniper.config.VoxelSniperConfig
-
Constructor Summary
ConstructorDescriptionVoxelSniperConfig
(boolean updateCheckerEnabled, int updateCheckerInterval, boolean messageOnLoginEnabled, boolean persistSessionsOnLogout, BlockType defaultBlockMaterial, BlockType defaultReplaceBlockMaterial, int defaultBrushSize, int litesniperMaxBrushSize, List<String> litesniperRestrictedMaterials, int brushSizeWarningThreshold, int defaultVoxelHeight, int defaultCylinderCenter, Map<String, Map<String, Object>> brushProperties) Create a new cached voxel configuration, used runtime. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return if persistent sessions are enabled.Return brush properties.int
Gets brush size warning threshold.Return default block typeint
Return default brush size.int
Return default cylinder center.Return default replace block type.int
Return default voxel height.int
Return maximum size of brushes that LiteSnipers can use.Return List of restricted Litesniper materials.int
Return update interval in hours.boolean
Return if the login message is enabled.boolean
Return if update checker is enabled.void
saveBrushPropertyToConfig
(String brush, String propertyKey, Object value) Force saving a brush property and its value to config.
-
Constructor Details
-
VoxelSniperConfig
public VoxelSniperConfig(boolean updateCheckerEnabled, int updateCheckerInterval, boolean messageOnLoginEnabled, boolean persistSessionsOnLogout, BlockType defaultBlockMaterial, BlockType defaultReplaceBlockMaterial, int defaultBrushSize, int litesniperMaxBrushSize, List<String> litesniperRestrictedMaterials, int brushSizeWarningThreshold, int defaultVoxelHeight, int defaultCylinderCenter, Map<String, Map<String, Object>> brushProperties) Create a new cached voxel configuration, used runtime.- Parameters:
updateCheckerEnabled
- whether to check for updatesupdateCheckerInterval
- period to wait in hours in-between checksmessageOnLoginEnabled
- if message on login is enabledpersistSessionsOnLogout
- if snipers shall be removed on logoutdefaultBlockMaterial
- default block materialdefaultReplaceBlockMaterial
- default replace block materialdefaultBrushSize
- default brush sizelitesniperMaxBrushSize
- litesniper max brush sizelitesniperRestrictedMaterials
- litesniper restricted materialsbrushSizeWarningThreshold
- brush size warning thresholddefaultVoxelHeight
- default voxel heightdefaultCylinderCenter
- default cylinder centerbrushProperties
- brush properties
-
-
Method Details
-
isUpdateCheckerEnabled
public boolean isUpdateCheckerEnabled()Return if update checker is enabled.- Returns:
true
if to check for updates periodically,false
otherwise.- Since:
- 2.8.0
- See Also:
-
getUpdateCheckerInterval
public int getUpdateCheckerInterval()Return update interval in hours.- Returns:
- interval in hours
- Since:
- 2.8.0
- See Also:
-
isMessageOnLoginEnabled
public boolean isMessageOnLoginEnabled()Return if the login message is enabled.- Returns:
true
if message on login is enabled,false
otherwise.- See Also:
-
arePersistentSessionsEnabled
public boolean arePersistentSessionsEnabled()Return if persistent sessions are enabled.- Returns:
true
if persistent session are enabled,false
otherwise.- See Also:
-
getDefaultBlockMaterial
Return default block type- Returns:
- default type
- See Also:
-
getDefaultReplaceBlockMaterial
Return default replace block type.- Returns:
- default type
- See Also:
-
getDefaultBrushSize
public int getDefaultBrushSize()Return default brush size.- Returns:
- default size
- See Also:
-
getLitesniperMaxBrushSize
public int getLitesniperMaxBrushSize()Return maximum size of brushes that LiteSnipers can use.- Returns:
- maximum size
- See Also:
-
getLitesniperRestrictedMaterials
Return List of restricted Litesniper materials.- Returns:
- List of restricted Litesniper materials
- See Also:
-
getBrushSizeWarningThreshold
public int getBrushSizeWarningThreshold()Gets brush size warning threshold.- Returns:
- the brush size warning threshold
- See Also:
-
getDefaultVoxelHeight
public int getDefaultVoxelHeight()Return default voxel height.- Returns:
- default height
- See Also:
-
getDefaultCylinderCenter
public int getDefaultCylinderCenter()Return default cylinder center.- Returns:
- default center
- See Also:
-
getBrushProperties
Return brush properties. This Map stores another Map (associating Property -> Value) per brush.- Returns:
- brush properties
- See Also:
-
saveBrushPropertyToConfig
Force saving a brush property and its value to config. Used to register missing or fix wrong values.- Parameters:
brush
- brushpropertyKey
- property keyvalue
- value
-