Adds more information to sentinel marker description
This commit is contained in:
parent
3d78e16c59
commit
6cc6233d25
@ -42,9 +42,17 @@ public class SentinelHandler extends AbstractTraitHandler {
|
||||
Class<? extends Trait> sentinelTrait = CitizensAPI.getTraitFactory().getTraitClass("sentinel");
|
||||
for (NPC npc : CitizensAPI.getNPCRegistry()) {
|
||||
if (npc.hasTrait(sentinelTrait)) {
|
||||
SentinelTrait trait = CitizensAPI.getTraitFactory().getTrait("sentinel");
|
||||
String description = "<h2>" + npc.getName() + "</h2><b>Armor:</b> " +
|
||||
trait.armor + "<br><b>Health:</b> " + trait.health;
|
||||
SentinelTrait trait = npc.getTraitNullable(SentinelTrait.class);
|
||||
String description = "<h2>" + npc.getName() + "</h2>";
|
||||
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();
|
||||
addNPCMarker(npc.getUniqueId(), "Sentinel NPC: ", description,
|
||||
DynmapCitizens.getInstance().getMarkerIcons().get(Icon.SENTINEL), sentinelSet);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user