}
return false;
}
public static void handleBuild(SignChangeEvent event) {
final SignChangeActionEvent info = new SignChangeActionEvent(event);
SignAction action = getSignAction(info);
if (action != null) {
if (action.build(info)) {
if (!action.canSupportRC() && info.isRCSign()) {
event.getPlayer().sendMessage(ChatColor.RED + "This sign does not support remote control!");
if (event.getLine(0).startsWith("[!")) {
event.setLine(0, "[!train]");
} else {
event.setLine(0, "[train]");
}
}
// Tell train above to update signs, if available
if (info.hasRails()) {
final MinecartMember<?> member = MinecartMemberStore.getAt(info.getRails());
if (member != null) {
member.getGroup().getBlockTracker().updatePosition();
}
}
} else {
event.setCancelled(true);
}
if (event.isCancelled()) {
return;
}
}
if (info.getMode() != SignActionMode.NONE && event.getBlock().getType() == Material.SIGN_POST) {
//snap to fixed 45-degree angle
BlockFace facing = BlockUtil.getFacing(event.getBlock());
BlockUtil.setFacing(event.getBlock(), Util.snapFace(facing));
}
}