Skip to content

Commit

Permalink
add mechanism npc.name_visible
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 23, 2019
1 parent 88e2692 commit 61af204
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion plugin/src/main/java/net/aufdemrand/denizen/objects/dNPC.java
Expand Up @@ -1448,7 +1448,7 @@ else if (!trait.isSneaking() && mechanism.getValue().asBoolean()) {
// <--[mechanism]
// @object dNPC
// @name set_distance
// @input Element
// @input Element(Decimal)
// @description
// Sets the NPC's distance margin.
// @tags
Expand All @@ -1458,6 +1458,19 @@ else if (!trait.isSneaking() && mechanism.getValue().asBoolean()) {
getNavigator().getDefaultParameters().distanceMargin(mechanism.getValue().asDouble());
}

// <--[mechanism]
// @object dNPC
// @name name_visible
// @input Element
// @description
// Sets whether the NPC's nameplate is visible. Input is 'true' (always visible), 'false' (never visible), or 'hover' (only visible while looking at the NPC).
// @tags
// TODO
// -->
if (mechanism.matches("name_visible")) {
getCitizen().data().setPersistent(NPC.NAMEPLATE_VISIBLE_METADATA, mechanism.getValue().asString());
}

// <--[mechanism]
// @object dNPC
// @name clear_waypoints
Expand Down

0 comments on commit 61af204

Please sign in to comment.