Exemplo n.º 1
0
        public override string ToString()
        {
            string block = "";

            switch (cbType)
            {
            case type.rcb:
                block = "repeating_command_block";
                break;

            case type.ccb:
                block = "chain_command_block";
                break;

            case type.icb:
                block = "command_block";
                break;
            }
            string cmd = command;

            if (CommandUtil.needEscape(command))
            {
                cmd = "\"" + CommandUtil.escape(cmd) + "\"";
            }
            return(String.Format("setblock ~{0} ~{1} ~{2} {3} {4} replace {{Command:{5}{6}}}", relativeX, relativeY, relativeZ, block, damage + (isCond ? 8 : 0), cmd, (isAuto ? ",auto:1b" : "")));
        }
Exemplo n.º 2
0
 public string escape(string text)
 {
     return(CommandUtil.escape(text));
 }