public TARDISCommands(TARDIS plugin) { this.plugin = plugin; // add transparent blocks transparent.add((byte) Material.AIR.getId()); transparent.add((byte) Material.SNOW.getId()); transparent.add((byte) Material.LONG_GRASS.getId()); transparent.add((byte) Material.VINE.getId()); // add first arguments firstArgs.add("chameleon"); firstArgs.add("save"); firstArgs.add("removesave"); firstArgs.add("list"); firstArgs.add("help"); firstArgs.add("find"); firstArgs.add("reload"); firstArgs.add("add"); firstArgs.add("remove"); firstArgs.add("update"); firstArgs.add("rebuild"); firstArgs.add("comehere"); firstArgs.add("direction"); firstArgs.add("setdest"); firstArgs.add("hide"); firstArgs.add("home"); firstArgs.add("occupy"); firstArgs.add("namekey"); firstArgs.add("version"); }
private static void initTransparentBlocks() { transparentBlocks.add(((Integer) Material.AIR.getId()).byteValue()); transparentBlocks.add(((Integer) Material.BREWING_STAND.getId()).byteValue()); transparentBlocks.add(((Integer) Material.BROWN_MUSHROOM.getId()).byteValue()); transparentBlocks.add(((Integer) Material.CAKE.getId()).byteValue()); transparentBlocks.add(((Integer) Material.CROPS.getId()).byteValue()); transparentBlocks.add(((Integer) Material.DETECTOR_RAIL.getId()).byteValue()); transparentBlocks.add(((Integer) Material.DIODE_BLOCK_ON.getId()).byteValue()); transparentBlocks.add(((Integer) Material.DIODE_BLOCK_OFF.getId()).byteValue()); transparentBlocks.add(((Integer) Material.LADDER.getId()).byteValue()); transparentBlocks.add(((Integer) Material.LAVA.getId()).byteValue()); transparentBlocks.add(((Integer) Material.LEVER.getId()).byteValue()); transparentBlocks.add(((Integer) Material.LONG_GRASS.getId()).byteValue()); transparentBlocks.add(((Integer) Material.MELON_STEM.getId()).byteValue()); transparentBlocks.add(((Integer) Material.NETHER_STALK.getId()).byteValue()); transparentBlocks.add(((Integer) Material.PAINTING.getId()).byteValue()); transparentBlocks.add(((Integer) Material.PORTAL.getId()).byteValue()); transparentBlocks.add(((Integer) Material.POWERED_RAIL.getId()).byteValue()); transparentBlocks.add(((Integer) Material.PUMPKIN_STEM.getId()).byteValue()); transparentBlocks.add(((Integer) Material.RAILS.getId()).byteValue()); transparentBlocks.add(((Integer) Material.RED_MUSHROOM.getId()).byteValue()); transparentBlocks.add(((Integer) Material.RED_ROSE.getId()).byteValue()); transparentBlocks.add(((Integer) Material.REDSTONE_TORCH_ON.getId()).byteValue()); transparentBlocks.add(((Integer) Material.REDSTONE_TORCH_OFF.getId()).byteValue()); transparentBlocks.add(((Integer) Material.REDSTONE_WIRE.getId()).byteValue()); transparentBlocks.add(((Integer) Material.SAPLING.getId()).byteValue()); transparentBlocks.add(((Integer) Material.SIGN_POST.getId()).byteValue()); transparentBlocks.add(((Integer) Material.SNOW.getId()).byteValue()); transparentBlocks.add(((Integer) Material.TORCH.getId()).byteValue()); transparentBlocks.add(((Integer) Material.VINE.getId()).byteValue()); transparentBlocks.add(((Integer) Material.WALL_SIGN.getId()).byteValue()); transparentBlocks.add(((Integer) Material.WATER.getId()).byteValue()); transparentBlocks.add(((Integer) Material.YELLOW_FLOWER.getId()).byteValue()); }
@Override public void populate(World world, Random random, Chunk source) { for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { int chance = random.nextInt(100); if (chance < 33) { Block handle = world.getHighestBlockAt(x + source.getX() * 16, z + source.getZ() * 16); if (handle.getRelative(BlockFace.DOWN).getType().equals(Material.GRASS)) { handle.setTypeIdAndData(Material.LONG_GRASS.getId(), (byte) 1, false); } } } } }
public PlayerManager() { nonSolid.add(0); for (int b = 8; b < 12; b++) nonSolid.add(b); nonSolid.add(Material.SNOW.getId()); nonSolid.add(Material.LONG_GRASS.getId()); nonSolid.add(Material.RED_MUSHROOM.getId()); nonSolid.add(Material.RED_ROSE.getId()); nonSolid.add(Material.YELLOW_FLOWER.getId()); nonSolid.add(Material.BROWN_MUSHROOM.getId()); nonSolid.add(Material.SIGN_POST.getId()); nonSolid.add(Material.WALL_SIGN.getId()); nonSolid.add(Material.FIRE.getId()); nonSolid.add(Material.TORCH.getId()); nonSolid.add(Material.REDSTONE_WIRE.getId()); nonSolid.add(Material.REDSTONE_TORCH_OFF.getId()); nonSolid.add(Material.REDSTONE_TORCH_ON.getId()); nonSolid.add(Material.VINE.getId()); }