Package org.bukkit

Examples of org.bukkit.DyeColor


        LogHelper.showInfo("cannonInteger", sender, ChatColor.RED);
        return true;
      }
    }
   
    DyeColor dye = null;

    try {
      for (DyeColor d : DyeColor.values()){
        String lower = d.name().toLowerCase();
        if (lower.equalsIgnoreCase(type)){
View Full Code Here


        LogHelper.showInfo("cannonInteger", sender, ChatColor.RED);
        return true;
      }
    }
   
    DyeColor dye = null;

    try {
      for (DyeColor d : DyeColor.values()){
        String lower = d.name().toLowerCase();
        if (lower.equalsIgnoreCase(type)){
View Full Code Here

                                LogHelper.showWarning("commandSignInvalid", player);
                                sign.getBlock().breakNaturally();
                            } else {
                                if (material == Material.WOOL || material == Material.INK_SACK){
                                    List<DyeColor> dyeMatches = ClosestMatches.dyeColor(data[1]);
                                    DyeColor dye = (dyeMatches.size() > 0 ? dyeMatches.get(0) : null);
                                    if (dye == null){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
                                        return;
                                    } else {
                                        e.setLine(1, WordUtils.capitalize(material.name().toLowerCase().replaceAll("_", ""))  + ":" + WordUtils.capitalize(dye.toString().toLowerCase().replaceAll("_", "")));
                                    }
                                } else {
                                    if (!data[1].matches(CommandsEX.intRegex)){
                                        LogHelper.showWarning("commandSignInvalid", player);
                                        sign.getBlock().breakNaturally();
View Full Code Here

    }
   
    private static short getData(String data, int id) {
        // Wool and ink are special
        if (id == WOOL_ID) {
            DyeColor dye = Enums.getEnumFromString(DyeColor.class, data);
            if (dye == null) dye = DyeColor.getByWoolData(Byte.parseByte(data));
            return dye.getWoolData();
        } else if (id == DYE_ID) {
            DyeColor dye = Enums.getEnumFromString(DyeColor.class, data);
            if (dye == null) dye = DyeColor.getByDyeData(Byte.parseByte(data));
            return dye.getDyeData();
        }
        return (data.matches("(-)?[0-9]+") ? Short.parseShort(data) : 0);
    }
View Full Code Here

    public static DyeColor matchDyeColor(String filter) throws CommandException {
        if (filter.equalsIgnoreCase("random")) {
            return DyeColor.getByData((byte) new Random().nextInt(15));
        }
        try {
            DyeColor match = DyeColor.valueOf(filter.toUpperCase());
            if (match != null) {
                return match;
            }
        } catch (IllegalArgumentException ignored) {}
        throw new CommandException("Unknown dye color name of '" + filter + "'.");
View Full Code Here

  protected void generateTower(WorldGenerator generator, RealChunk chunk, TowerStyle style) {
   
    // set things up for darkness
    Material wallMaterial = Material.OBSIDIAN;
    Material trimMaterial = Material.AIR;
    DyeColor windowPrimaryColor = DyeColor.BLACK;
    DyeColor windowSecondaryColor = DyeColor.PURPLE;
   
    // adjust for lightness
    if (style == TowerStyle.LIGHT) {
      wallMaterial = Material.ENDER_STONE;
      trimMaterial = Material.GLOWSTONE;
View Full Code Here

    int z1 = 4;
    int z2 = z1 + 8;
    int Height = FloorHeight;

    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
    boolean firstFloor = true;
   
    while (y + Height < y2) {
     
      // walls please
View Full Code Here

    int z1 = 4;
    int z2 = z1 + 8;
    int y3 = y2 - 2;
   
    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
    boolean firstFloor = true;
   
    for (int y = y1; y < y3; y += FloorHeight) {
     
      // walls please
View Full Code Here

    int x2 = x1 + buildingWidth;
    int z1 = x1;
    int z2 = z1 + buildingWidth;
   
    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
   
    // lower bit
    chunk.setClayWalls(x1 + 1, x2 - 1, y1, y1 + 1, z1 + 1, z2 - 1, coreColor);
    chunk.setClayWalls(x1 + 1, x2 - 1, y1 + 1, y1 + 2, z1 + 1, z2 - 1, coreColor);
   
View Full Code Here

    int x2 = x1 + 12;
    int z1 = 2;
    int z2 = z1 + 12;
    int y3 = y2 - 5;

    DyeColor coreColor = odds.getRandomColor();
   
    // initial pylon
    chunk.setClay(x1 + 4, x2 - 4, y1, y1 + 2, z1 + 4, z2 - 4, coreColor);
   
    // rest of the pylon and balls
View Full Code Here

TOP

Related Classes of org.bukkit.DyeColor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.