/** * Set block type. * * @param pt * @param type * @return */ @Override public boolean setBlockType(Vector pt, int type) { world.setBlockId( pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, WorldEditPlugin.getInstance()); return world.getBlockId(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()) != type; }
/** * set block type & data * * @param pt * @param type * @param data * @return */ @Override public boolean setTypeIdAndData(Vector pt, int type, int data) { int origType = getBlockType(pt), origData = getBlockData(pt); world.setBlockIdAndData( pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), (short) type, (short) data, WorldEditPlugin.getInstance()); return origType != type && origData != data; }