Skip to content
Permalink
Browse files
Improve set_blockdata docs
  • Loading branch information
PseudoKnight committed May 8, 2020
1 parent 1ffa65d commit 62849f8eaf424f89681ad0cff6109a8057772ffe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
@@ -1141,7 +1141,7 @@ public String getName() {

@Override
public String docs() {
return "{location: <location match> | player: <string match>} "
return "{location: <location match> | player: <macro>} "
+ "Fires when a player steps on a pressure plate or other interactable block."
+ "{location: The location of the block | activated: (deprecated)"
+ " | player: The player associated with this event}"
@@ -361,7 +361,10 @@ public Integer[] numArgs() {

@Override
public String docs() {
return "void {locationArray, data, [physics]} Sets the block at the location from a blockdata object.";
return "void {locationArray, data, [physics]} Sets the block at the location from a blockdata object."
+ " Blockdata can be an associative array or string format."
+ " If an array, a 'block' key must exist with the block material."
+ " All the other keys must be a blockstate and its value.";
}

@Override
@@ -394,7 +397,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment env, M
bd = Static.getServer().createBlockData(args[1].val());
}
} catch (IllegalArgumentException ex) {
throw new CREIllegalArgumentException("Cannot create block data from string: " + args[1].val(), t);
throw new CREIllegalArgumentException("Cannot create block data from: " + args[1].val(), t);
}
b.setBlockData(bd, physics);
return CVoid.VOID;

0 comments on commit 62849f8

Please sign in to comment.