public void CatchBlock(Player p, ushort x, ushort z, ushort y, byte NewType, bool placed, object DataPass) { CatchPos cpos = (CatchPos)DataPass; cpos.pos = new Point3(x, z, y); p.CatchNextBlockchange(CatchBlock2, (object)cpos); }
public void Use(Player p, string[] args) { CatchPos cpos = new CatchPos(); if (args.Length == 1) { try { cpos.ignore = Blocks.NameToByte(args[0]); } catch { p.SendMessage("Could not find block specified"); return; } p.SendMessage("Ignoring " + args[0]); } else cpos.ignore = (byte)(Blocks.Types.zero); //So it doesn't ignore air. p.SendMessage("Place two blocks to determine the edges."); p.CatchNextBlockchange(new Player.BlockChangeDelegate(CatchBlock), (object)cpos); }
public void Use(Player p, string[] args) { byte type = 0; byte type2 = 0; if (args.Length != 2) { p.SendMessage("Invalid arguments!"); Help(p); return; } try { type = Blocks.NameToByte(args[0]); type2 = Blocks.NameToByte(args[1]); } catch { p.SendMessage("Could not find block specified"); return; } //Block permissions here. CatchPos cpos = new CatchPos(); cpos.type = type; cpos.type2 = type2; p.SendMessage("Place two blocks to determine the edges."); p.CatchNextBlockchange(new Player.BlockChangeDelegate(CatchBlock), (object)cpos); }
public void Use(Player p, string[] args) { p.SendMessage("Please place/destroy a block."); p.CatchNextBlockchange(new Player.BlockChangeDelegate(BlockChange), null); }