Implements custom configuration values for blacksmiths and sentinels
This commit is contained in:
@@ -7,9 +7,12 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
*/
|
||||
public class BlacksmithSettings extends AbstractTraitSettings {
|
||||
|
||||
private boolean displayBlacksmithSettings;
|
||||
|
||||
@Override
|
||||
public void load(FileConfiguration configuration) {
|
||||
super.load(configuration);
|
||||
displayBlacksmithSettings = configuration.getBoolean(getTraitConfigRoot() + ".displayBlacksmithSettings", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -17,4 +20,13 @@ public class BlacksmithSettings extends AbstractTraitSettings {
|
||||
return "traits.blacksmith";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display information about a blacksmith's settings, such as cool-down, in the marker description
|
||||
*
|
||||
* @return <p>True if blacksmith settings should be displayed</p>
|
||||
*/
|
||||
public boolean displayBlacksmithSettings() {
|
||||
return displayBlacksmithSettings;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -7,9 +7,12 @@ import org.bukkit.configuration.file.FileConfiguration;
|
||||
*/
|
||||
public class SentinelSettings extends AbstractTraitSettings {
|
||||
|
||||
private boolean displaySentinelStats;
|
||||
|
||||
@Override
|
||||
public void load(FileConfiguration configuration) {
|
||||
super.load(configuration);
|
||||
displaySentinelStats = configuration.getBoolean(getTraitConfigRoot() + ".displaySentinelStats", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -17,4 +20,13 @@ public class SentinelSettings extends AbstractTraitSettings {
|
||||
return "traits.sentinel";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to display information about a sentinel such as health, attack and targets in marker descriptions
|
||||
*
|
||||
* @return <p>True if sentinel stats should be displayed</p>
|
||||
*/
|
||||
public boolean displaySentinelStats() {
|
||||
return displaySentinelStats;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user