Java Code Examples for org.bukkit.DyeColor#WHITE
The following examples show how to use
org.bukkit.DyeColor#WHITE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VillagerShop.java From Shopkeepers with GNU General Public License v3.0 | 6 votes |
private DyeColor getProfessionWoolColor() { switch (profession) { case FARMER: return DyeColor.BROWN; case LIBRARIAN: return DyeColor.WHITE; case PRIEST: return DyeColor.MAGENTA; case BLACKSMITH: return DyeColor.GRAY; case BUTCHER: return DyeColor.SILVER; default: // TODO update this once we only support MC 1.11 upwards if (profession.name().equals("NITWIT")) { return DyeColor.GREEN; } // unknown profession: return DyeColor.RED; } }
Example 2
Source File: BukkitUtils.java From ProjectAres with GNU Affero General Public License v3.0 | 5 votes |
public static DyeColor chatColorToDyeColor(ChatColor chatColor) { DyeColor dyeColor = CHAT_DYE_MAP.get(chatColor); if (dyeColor != null) { return dyeColor; } else { return DyeColor.WHITE; } }
Example 3
Source File: MiscUtil.java From CardinalPGM with MIT License | 5 votes |
public static DyeColor convertChatColorToDyeColor(ChatColor chatColor) { switch (chatColor) { case WHITE: return DyeColor.WHITE; case AQUA: return DyeColor.LIGHT_BLUE; case GOLD: return DyeColor.ORANGE; case LIGHT_PURPLE: return DyeColor.MAGENTA; case YELLOW: return DyeColor.YELLOW; case GREEN: return DyeColor.LIME; case RED: return DyeColor.PINK; case GRAY: return DyeColor.SILVER; case DARK_GRAY: return DyeColor.GRAY; case DARK_AQUA: return DyeColor.CYAN; case DARK_PURPLE: return DyeColor.PURPLE; case DARK_BLUE: return DyeColor.BLUE; case BLUE: return DyeColor.BLUE; case DARK_GREEN: return DyeColor.GREEN; case DARK_RED: return DyeColor.RED; case BLACK: return DyeColor.BLACK; } return DyeColor.WHITE; }
Example 4
Source File: SheepShop.java From Shopkeepers with GNU General Public License v3.0 | 5 votes |
@Override public void cycleSubType() { byte colorByte = color.getWoolData(); colorByte += 1; color = DyeColor.getByWoolData(colorByte); if (color == null) { color = DyeColor.WHITE; } this.applySubType(); }
Example 5
Source File: SimpleGoal.java From PGM with GNU Affero General Public License v3.0 | 4 votes |
@Override public DyeColor getDyeColor() { return DyeColor.WHITE; }
Example 6
Source File: OwnedGoal.java From PGM with GNU Affero General Public License v3.0 | 4 votes |
@Override public DyeColor getDyeColor() { return owner != null ? BukkitUtils.chatColorToDyeColor(owner.getColor()) : DyeColor.WHITE; }
Example 7
Source File: SimpleGoal.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
@Override public DyeColor getDyeColor() { return DyeColor.WHITE; }
Example 8
Source File: OwnedGoal.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
@Override public DyeColor getDyeColor() { return owner != null ? BukkitUtils.chatColorToDyeColor(owner.getColor()) : DyeColor.WHITE; }
Example 9
Source File: TropicalFishDisguise.java From iDisguise with Creative Commons Attribution Share Alike 4.0 International | 4 votes |
public TropicalFishDisguise() { this(DyeColor.WHITE, DyeColor.RED, Pattern.CLAYFISH); }
Example 10
Source File: Parser.java From CardinalPGM with MIT License | 4 votes |
public static DyeColor parseDyeColor(String string) { for (DyeColor color : DyeColor.values()) { if (color.name().equals(Strings.getTechnicalName(string))) return color; } return DyeColor.WHITE; }
Example 11
Source File: SheepDisguise.java From iDisguise with Creative Commons Attribution Share Alike 4.0 International | 2 votes |
/** * Creates an instance. * * @since 5.1.1 */ public SheepDisguise() { this(true, DyeColor.WHITE); }