Implements custom configuration values for blacksmiths and sentinels

This commit is contained in:
2022-11-03 14:24:18 +01:00
parent 1906e593e3
commit be127d0733
5 changed files with 43 additions and 14 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}