Implements custom configuration values for blacksmiths and sentinels
This commit is contained in:
@ -71,13 +71,16 @@ public class BlacksmithHandler extends AbstractTraitHandler {
|
||||
*/
|
||||
private String getDetailedBlacksmithInfo(NPC npc, NPCSettings npcSettings) {
|
||||
String info = "<h2>" + npc.getName() + " the " +
|
||||
npcSettings.getBlacksmithTitle() + "</h2><b>Fail chance:</b> " + npcSettings.getFailChance() +
|
||||
"<br><b>Enchantment chance:</b> " + npcSettings.getExtraEnchantmentChance() + "<br><b>Delay:</b> " +
|
||||
npcSettings.getMinReforgeDelay() + " to " + npcSettings.getMaxReforgeDelay() +
|
||||
" seconds<br><b>Cool-down:</b> " + npcSettings.getReforgeCoolDown() + " seconds<br><b>Drop item:</b> " +
|
||||
npcSettings.getDropItem() + "<br><b>Max enchantments:</b> " + npcSettings.getMaxEnchantments();
|
||||
if (!npcSettings.getReforgeAbleItems().isEmpty()) {
|
||||
info += "<br><b>Reforge-able items:</b> " + getReforgeAbleItemsString(npcSettings.getReforgeAbleItems());
|
||||
npcSettings.getBlacksmithTitle() + "</h2>";
|
||||
if (settings.displayBlacksmithSettings()) {
|
||||
info += "<b>Fail chance:</b> " + npcSettings.getFailChance() +
|
||||
"<br><b>Enchantment chance:</b> " + npcSettings.getExtraEnchantmentChance() + "<br><b>Delay:</b> " +
|
||||
npcSettings.getMinReforgeDelay() + " to " + npcSettings.getMaxReforgeDelay() +
|
||||
" seconds<br><b>Cool-down:</b> " + npcSettings.getReforgeCoolDown() + " seconds<br><b>Drop item:</b> " +
|
||||
npcSettings.getDropItem() + "<br><b>Max enchantments:</b> " + npcSettings.getMaxEnchantments();
|
||||
if (!npcSettings.getReforgeAbleItems().isEmpty()) {
|
||||
info += "<br><b>Reforge-able items:</b> " + getReforgeAbleItemsString(npcSettings.getReforgeAbleItems());
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
@ -46,12 +46,14 @@ public class SentinelHandler extends AbstractTraitHandler {
|
||||
if (trait.squad != null) {
|
||||
description += "<br><b>Squad:</b> " + trait.squad;
|
||||
}
|
||||
description += "<br><b>Invincible:</b> " + trait.invincible + "<br><b>Armor:</b> " +
|
||||
trait.armor + "<br><b>Health:</b> " + trait.health + "<br><b>Accuracy:</b> " + trait.accuracy +
|
||||
"<br><b>Damage:</b> " + trait.damage + "<br><b>Allow knockback:</b> " + trait.allowKnockback;
|
||||
description += "<br><b>Range:</b> " + trait.range + "<br><b>Reach:</b> " + trait.reach;
|
||||
description += "<br><b>Targets:</b> " + trait.allTargets.toAllInOneString() + "<br><b>Avoids:</b> " +
|
||||
trait.allAvoids.toAllInOneString() + "<br><b>Ignores:</b> " + trait.allIgnores.toAllInOneString();
|
||||
if (settings.displaySentinelStats()) {
|
||||
description += "<br><b>Invincible:</b> " + trait.invincible + "<br><b>Armor:</b> " +
|
||||
trait.armor + "<br><b>Health:</b> " + trait.health + "<br><b>Accuracy:</b> " + trait.accuracy +
|
||||
"<br><b>Damage:</b> " + trait.damage + "<br><b>Allow knockback:</b> " + trait.allowKnockback;
|
||||
description += "<br><b>Range:</b> " + trait.range + "<br><b>Reach:</b> " + trait.reach;
|
||||
description += "<br><b>Targets:</b> " + trait.allTargets.toAllInOneString() + "<br><b>Avoids:</b> " +
|
||||
trait.allAvoids.toAllInOneString() + "<br><b>Ignores:</b> " + trait.allIgnores.toAllInOneString();
|
||||
}
|
||||
addNPCMarker(npc.getUniqueId(), "Sentinel NPC: ", description,
|
||||
DynmapCitizens.getInstance().getGlobalSettings().getMarkerIcons().get(Icon.SENTINEL), super.markerSet);
|
||||
}
|
||||
|
Reference in New Issue
Block a user