Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mcmonkey4eva/Denizen
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 1, 2016
2 parents 60e0f40 + ba88f7f commit e8540da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Expand Up @@ -3071,16 +3071,14 @@ public void registerCoreMembers() {

// <--[command]
// @Name Sign
// @Syntax sign (type:{sign_post}/wall_sign) ["<line>|..."] [<location>] (direction:n/e/w/s)
// @Syntax sign (type:{automatic}/sign_post/wall_sign) ["<line>|..."] [<location>] (direction:n/e/w/s)
// @Required 1
// @Stable stable
// @Short Modifies a sign.
// @Author David Cernat, mcmonkey
// @Group world
// @Description
// TODO: Document Command Details
// Specify 'automatic' as a type to use whatever sign type and direction is already placed there.
// If there is not already a sign there, defaults to a sign_post.
// @Tags
// <l@location.block.sign_contents>
// @Usage
Expand Down
Expand Up @@ -58,7 +58,7 @@ else if (!scriptEntry.hasObject("text")) {
throw new InvalidArgumentsException("Must specify sign text!");
}

// Default to SIGN_POST type
// Default to AUTOMATIC
scriptEntry.defaultObject("type", new Element(Type.AUTOMATIC.name()));
}

Expand All @@ -82,7 +82,7 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
if (type != Type.AUTOMATIC
|| (sign.getType() != Material.WALL_SIGN
&& sign.getType() != Material.SIGN_POST)) {
sign.setType(type == Type.WALL_SIGN ? Material.WALL_SIGN : Material.SIGN_POST);
sign.setType(type == Type.WALL_SIGN ? Material.WALL_SIGN : Material.SIGN_POST, false);
}
BlockState signState = sign.getState();

Expand Down

0 comments on commit e8540da

Please sign in to comment.