Java Code Examples for org.bukkit.ChatColor#DARK_AQUA

The following examples show how to use org.bukkit.ChatColor#DARK_AQUA . 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: ScoreboardSlot.java    From 1.13-Command-API with Apache License 2.0 5 votes vote down vote up
/**
 * Determines the scoreboard slot value based on an internal Minecraft integer
 * @param i the scoreboard slot value
 */
public ScoreboardSlot(int i) {
	//Initialize displaySlot
	switch(i) {
		case 0: displaySlot = DisplaySlot.PLAYER_LIST; break;
		case 1: displaySlot = DisplaySlot.SIDEBAR; break;
		case 2: displaySlot = DisplaySlot.BELOW_NAME; break;
		default: displaySlot = DisplaySlot.SIDEBAR; break;
	}
	
	//Initialize teamColor
	switch(i) {
		case 3: teamColor = ChatColor.BLACK; break;
		case 4: teamColor = ChatColor.DARK_BLUE; break;
		case 5: teamColor = ChatColor.DARK_GREEN; break;
		case 6: teamColor = ChatColor.DARK_AQUA; break;
		case 7: teamColor = ChatColor.DARK_RED; break;
		case 8: teamColor = ChatColor.DARK_PURPLE; break;
		case 9: teamColor = ChatColor.GOLD; break;
		case 10: teamColor = ChatColor.GRAY; break;
		case 11: teamColor = ChatColor.DARK_GRAY; break;
		case 12: teamColor = ChatColor.BLUE; break;
		case 13: teamColor = ChatColor.GREEN; break;
		case 14: teamColor = ChatColor.AQUA; break;
		case 15: teamColor = ChatColor.RED; break;
		case 16: teamColor = ChatColor.LIGHT_PURPLE; break;
		case 17: teamColor = ChatColor.YELLOW; break;
		case 18: teamColor = ChatColor.WHITE; break;
		default: teamColor = null; break;
	}
}
 
Example 2
Source File: Teams.java    From CardinalPGM with MIT License 5 votes vote down vote up
public static ChatColor getTeamColorByPlayer(OfflinePlayer player) {
    if (player.isOnline()) {
        Optional<TeamModule> team = getTeamByPlayer(player.getPlayer());
        if (team.isPresent()) return team.get().getColor();
        else return ChatColor.YELLOW;
    } else return ChatColor.DARK_AQUA;
}
 
Example 3
Source File: Players.java    From CardinalPGM with MIT License 5 votes vote down vote up
public static String getName(ServerOperator who, boolean flairs) {
    if (who instanceof OfflinePlayer) {
        OfflinePlayer player = (OfflinePlayer) who;
        return player.isOnline() ? (flairs ? player.getPlayer().getDisplayName() : Teams.getTeamColorByPlayer(player) + player.getPlayer().getName()) : Rank.getPrefix(player.getUniqueId()) + ChatColor.DARK_AQUA + player.getName();
    } else {
        return ChatColor.GOLD + "\u2756" + ChatColor.DARK_AQUA + "Console";
    }
}
 
Example 4
Source File: Contributor.java    From CardinalPGM with MIT License 5 votes vote down vote up
public String getDisplayName() {
    if (uniqueId == null) return ChatColor.DARK_AQUA + name;
    if (Bukkit.getOfflinePlayer(uniqueId).isOnline()) {
        return Bukkit.getPlayer(uniqueId).getDisplayName();
    } else {
        return Rank.getPrefix(uniqueId) + ChatColor.DARK_AQUA + name;
    }
}
 
Example 5
Source File: ScriptBuilderPrompt.java    From HoloAPI with GNU General Public License v3.0 5 votes vote down vote up
@Override
public String getPromptText(ConversationContext context) {
    if (this.currentlyEditing == 0 && lines.isEmpty()) {
        return ChatColor.DARK_AQUA + "function(hologram, player) {";
    }
    int edit = currentlyEditing;
    currentlyEditing = lines.size() - 1;
    return new PowerMessage().then(edit).colour(ChatColor.DARK_AQUA).then(lines.get(edit)).colour(ChatColor.AQUA).group().tooltip(buildCompiledOutput()).tooltip(ChatColor.YELLOW + "" + ChatColor.ITALIC + "Click to edit this line").perform("script editcurrent " + edit).exit().toJson();
}
 
Example 6
Source File: ProgrammableAndroid.java    From Slimefun4 with GNU General Public License v3.0 5 votes vote down vote up
public void openScriptEditor(Player p, Block b) {
    ChestMenu menu = new ChestMenu(ChatColor.DARK_AQUA + SlimefunPlugin.getLocalization().getMessage(p, "android.scripts.editor"));

    menu.addItem(1, new CustomItem(SlimefunUtils.getCustomHead("d9bf6db4aeda9d8822b9f736538e8c18b9a4844f84eb45504adfbfee87eb"), "&2> Edit Script", "", "&aEdits your current Script"));
    menu.addMenuClickHandler(1, (pl, slot, item, action) -> {
        openScript(pl, b, getScript(b.getLocation()));
        return false;
    });

    menu.addItem(3, new CustomItem(SlimefunUtils.getCustomHead("171d8979c1878a05987a7faf21b56d1b744f9d068c74cffcde1ea1edad5852"), "&4> Create new Script", "", "&cDeletes your current Script", "&cand creates a blank one"));
    menu.addMenuClickHandler(3, (pl, slot, item, action) -> {
        openScript(pl, b, DEFAULT_SCRIPT);
        return false;
    });

    menu.addItem(5, new CustomItem(SlimefunUtils.getCustomHead("c01586e39f6ffa63b4fb301b65ca7da8a92f7353aaab89d3886579125dfbaf9"), "&6> Download a Script", "", "&eDownload a Script from the Server", "&eYou can edit or simply use it"));
    menu.addMenuClickHandler(5, (pl, slot, item, action) -> {
        openScriptDownloader(pl, b, 1);
        return false;
    });

    menu.addItem(8, new CustomItem(SlimefunUtils.getCustomHead("a185c97dbb8353de652698d24b64327b793a3f32a98be67b719fbedab35e"), "&6> Back", "", "&7Return to the Android's interface"));
    menu.addMenuClickHandler(8, (pl, slot, item, action) -> {
        BlockStorage.getInventory(b).open(p);
        return false;
    });

    menu.open(p);
}
 
Example 7
Source File: MiscUtil.java    From CardinalPGM with MIT License 5 votes vote down vote up
public static ChatColor convertDyeColorToChatColor(DyeColor dye) {
    switch (dye) {
        case WHITE:
            return ChatColor.WHITE;
        case ORANGE:
            return ChatColor.GOLD;
        case MAGENTA:
            return ChatColor.LIGHT_PURPLE;
        case LIGHT_BLUE:
            return ChatColor.BLUE;
        case YELLOW:
            return ChatColor.YELLOW;
        case LIME:
            return ChatColor.GREEN;
        case PINK:
            return ChatColor.RED;
        case GRAY:
            return ChatColor.DARK_GRAY;
        case SILVER:
            return ChatColor.GRAY;
        case CYAN:
            return ChatColor.DARK_AQUA;
        case PURPLE:
            return ChatColor.DARK_PURPLE;
        case BLUE:
            return ChatColor.DARK_BLUE;
        case BROWN:
            return ChatColor.GOLD;
        case GREEN:
            return ChatColor.DARK_GREEN;
        case RED:
            return ChatColor.DARK_RED;
        case BLACK:
            return ChatColor.BLACK;
    }

    return ChatColor.WHITE;
}
 
Example 8
Source File: IslandInfo.java    From uSkyBlock with GNU General Public License v3.0 5 votes vote down vote up
@Override
public String toString() {
    String str = "\u00a7bIsland Info:\n";
    str += ChatColor.GRAY + "  - level: " + ChatColor.DARK_AQUA + String.format("%5.2f", getLevel()) + "\n";
    str += ChatColor.GRAY + "  - location: " + ChatColor.DARK_AQUA + name + "\n";
    str += ChatColor.GRAY + "  - biome: " + ChatColor.DARK_AQUA + getBiome() + "\n";
    str += ChatColor.GRAY + "  - schematic: " + ChatColor.DARK_AQUA + getSchematicName() + "\n";
    str += ChatColor.GRAY + "  - warp: " + ChatColor.DARK_AQUA + hasWarp() + "\n";
    if (hasWarp()) {
        str += ChatColor.GRAY + "     loc: " + ChatColor.DARK_AQUA + LocationUtil.asString(getWarpLocation()) + "\n";
    }
    str += ChatColor.GRAY + "  - locked: " + ChatColor.DARK_AQUA + isLocked() + "\n";
    str += ChatColor.GRAY + "  - ignore: " + ChatColor.DARK_AQUA + ignore() + "\n";
    str += ChatColor.DARK_AQUA + "Party:\n";
    str += ChatColor.GRAY + "  - leader: " + ChatColor.DARK_AQUA + getLeader() + "\n";
    str += ChatColor.GRAY + "  - members: " + ChatColor.DARK_AQUA + getMembers() + "\n";
    str += ChatColor.GRAY + "  - size: " + ChatColor.DARK_AQUA + getPartySize() + "\n";
    str += ChatColor.DARK_AQUA + "Limits:\n";
    str += ChatColor.GRAY + "  - maxParty: " + ChatColor.DARK_AQUA + getMaxPartySize() + "\n";
    str += ChatColor.GRAY + "  - animals: " + ChatColor.DARK_AQUA + getMaxAnimals() + "\n";
    str += ChatColor.GRAY + "  - monsters: " + ChatColor.DARK_AQUA + getMaxMonsters() + "\n";
    str += ChatColor.GRAY + "  - villagers: " + ChatColor.DARK_AQUA + getMaxVillagers() + "\n";
    str += ChatColor.DARK_AQUA + "Bans:\n";
    for (String ban : getBans()) {
        str += ChatColor.GRAY + "  - " + ban + "\n";
    }
    str += ChatColor.DARK_AQUA + "Log:\n";
    for (String log : getLog()) {
        str += ChatColor.GRAY + "  - " + log + "\n";
    }
    return str;
}
 
Example 9
Source File: MiscUtil.java    From CardinalPGM with MIT License 5 votes vote down vote up
public static ChatColor convertBannerColorToChatColor(DyeColor dye) {
    switch (dye) {
        case WHITE:
            return ChatColor.WHITE;
        case ORANGE:
            return ChatColor.GOLD;
        case MAGENTA:
            return ChatColor.LIGHT_PURPLE;
        case LIGHT_BLUE:
            return ChatColor.BLUE;
        case YELLOW:
            return ChatColor.YELLOW;
        case LIME:
            return ChatColor.GREEN;
        case PINK:
            return ChatColor.RED;
        case GRAY:
            return ChatColor.DARK_GRAY;
        case SILVER:
            return ChatColor.GRAY;
        case CYAN:
            return ChatColor.DARK_AQUA;
        case PURPLE:
            return ChatColor.DARK_PURPLE;
        case BLUE:
            return ChatColor.BLUE;
        case BROWN:
            return ChatColor.GOLD;
        case GREEN:
            return ChatColor.DARK_GREEN;
        case RED:
            return ChatColor.DARK_RED;
        case BLACK:
            return ChatColor.BLACK;
    }

    return ChatColor.WHITE;
}
 
Example 10
Source File: ScoreMatchModule.java    From PGM with GNU Affero General Public License v3.0 5 votes vote down vote up
/** Gets the score message for the match. */
public String getScoreMessage() {
  List<String> scores = Lists.newArrayList();
  for (Entry<Competitor, Double> scorePair : this.scores.entrySet()) {
    scores.add(scorePair.getKey().getColor().toString() + ((int) (double) scorePair.getValue()));
  }
  return ChatColor.DARK_AQUA + "Score: " + Joiner.on(" ").join(scores);
}
 
Example 11
Source File: StatzUtil.java    From Statz with GNU General Public License v3.0 4 votes vote down vote up
public static String getInfoString(Query query, PlayerStat statType, String playerName) {
    StringBuilder builder = new StringBuilder(ChatColor.GOLD + playerName + ChatColor.DARK_AQUA + " ");

    if (statType.equals(PlayerStat.ARROWS_SHOT)) {
        builder.append(createStringWithParams("shot {0} arrows on world '{1}'",
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.BLOCKS_BROKEN)) {
        builder.append(createStringWithParams("broke {0} blocks of {1} on world '{2}'.",
                (int) query.getValue(), query.getValue("block"), query.getValue("world")));
    } else if (statType.equals(PlayerStat.BLOCKS_PLACED)) {
        builder.append(createStringWithParams(
                "placed {0} blocks of {1} on world '{2}'.", (int) query.getValue(),
                query.getValue("block"), query.getValue("world")));
    } else if (statType.equals(PlayerStat.BUCKETS_EMPTIED)) {
        builder.append(createStringWithParams("emptied {0} buckets on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.BUCKETS_FILLED)) {
        builder.append(createStringWithParams("filled {0} buckets on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.COMMANDS_PERFORMED)) {
        builder.append(createStringWithParams(
                "performed " + ChatColor.GREEN + "{0}" + ChatColor.DARK_AQUA + " {1} times on world '{2}'",
                query.getValue("command").toString() + " " + query.getValue("arguments").toString(),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.DAMAGE_TAKEN)) {
        builder.append(createStringWithParams("took {0} points of damage by {1} on world '{2}'",
                (int) query.getValue(), query.getValue("cause").toString(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.DEATHS)) {
        builder.append(createStringWithParams("died {0} times on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.DISTANCE_TRAVELLED)) {
        builder.append(createStringWithParams("travelled {0} blocks on world '{1}' by {2}",
                roundDouble(query.getValue(), 2), query.getValue("world"), query.getValue("moveType")));
    } else if (statType.equals(PlayerStat.EGGS_THROWN)) {
        builder.append(createStringWithParams("has thrown {0} eggs on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.ENTERED_BEDS)) {
        builder.append(createStringWithParams("has slept {0} times in a bed on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.FOOD_EATEN)) {
        builder.append(createStringWithParams("has eaten {0} {1} times on world '{2}'", query.getValue("foodEaten"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.ITEMS_CAUGHT)) {
        builder.append(createStringWithParams("has caught {0} {1} times on world '{2}'", query.getValue("caught"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.ITEMS_CRAFTED)) {
        builder.append(createStringWithParams("has crafted {0} {1} times on world '{2}'", query.getValue("item"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.ITEMS_DROPPED)) {
        builder.append(createStringWithParams("has dropped {0} {1} times on world '{2}'", query.getValue("item"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.ITEMS_PICKED_UP)) {
        builder.append(createStringWithParams("has picked up {0} {1} times on world '{2}'", query.getValue("item"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.JOINS)) {
        builder.append(createStringWithParams("has joined the server {0} times", (int) query.getValue()));
    } else if (statType.equals(PlayerStat.KILLS_MOBS)) {
        builder.append(createStringWithParams("has killed {0}s {1} times on world '{2}'", query.getValue("mob"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.KILLS_PLAYERS)) {
        builder.append(createStringWithParams("has killed {0} {1} times on world '{2}'",
                query.getValue("playerKilled"), (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.TELEPORTS)) {
        builder.append(createStringWithParams("has teleported from {0} to {1} {2} times because of {3}",
                query.getValue("world"), query.getValue("destWorld"), (int) query.getValue(),
                query.getValue("cause")));
    } else if (statType.equals(PlayerStat.TIME_PLAYED)) {
        builder.append(createStringWithParams("has played for {0} on world '{1}'",
                StatzUtil.timeToString((int) query.getValue(), Time.MINUTES), query.getValue("world")));
    } else if (statType.equals(PlayerStat.TIMES_KICKED)) {
        builder.append(createStringWithParams("has been kicked {0} times on world '{1}' with reason '{2}'",
                (int) query.getValue(), query.getValue("world"), query.getValue("reason")));
    } else if (statType.equals(PlayerStat.TIMES_SHORN)) {
        builder.append(createStringWithParams("has shorn {0} sheep on world '{2}'", (int) query.getValue(),
                query.getValue("world")));
    } else if (statType.equals(PlayerStat.TOOLS_BROKEN)) {
        builder.append(createStringWithParams("has broken {0} {1} times on world '{2}'", query.getValue("item"),
                (int) query.getValue(), query.getValue("world")));
    } else if (statType.equals(PlayerStat.VILLAGER_TRADES)) {
        builder.append(createStringWithParams("has traded with {0} villagers on world '{1}' for item {2}",
                (int) query.getValue(), query.getValue("world"), query.getValue("trade")));
    } else if (statType.equals(PlayerStat.VOTES)) {
        builder.append(createStringWithParams("has voted {0} times", (int) query.getValue()));
    } else if (statType.equals(PlayerStat.WORLDS_CHANGED)) {
        builder.append(createStringWithParams("has changed from {0} to {1} {2} times", query.getValue("world"),
                query.getValue("destWorld"), (int) query.getValue()));
    } else if (statType.equals(PlayerStat.XP_GAINED)) {
        builder.append(createStringWithParams("has gained {0} points of xp on world '{1}'", (int) query.getValue(),
                query.getValue("world")));
    }

    return builder.toString();
}
 
Example 12
Source File: Util.java    From ObsidianDestroyer with GNU General Public License v3.0 4 votes vote down vote up
public static String header() {
    return ChatColor.DARK_AQUA + "[" + ChatColor.AQUA + "ObsidianDestroyer" + ChatColor.DARK_AQUA + "] " + ChatColor.RESET;
}
 
Example 13
Source File: MonumentModes.java    From CardinalPGM with MIT License 4 votes vote down vote up
public String toChatMessage() {
    String strike = hasRan() ? ChatColor.STRIKETHROUGH + "" : "";
    return ChatColor.GOLD + strike + "${index}. " + ChatColor.LIGHT_PURPLE + strike + name + " - " + ChatColor.AQUA
            + strike + Strings.formatTime(getTimeAfter()) + ChatColor.DARK_AQUA + strike +
            (GameHandler.getGameHandler().getMatch().isRunning() ? " (" + Strings.formatTime(Math.max(getTimeAfter() - MatchTimer.getTimeInSeconds(), 0)) + " left)" : "");
}
 
Example 14
Source File: CycleTimer.java    From CardinalPGM with MIT License 4 votes vote down vote up
@Override
public ChatMessage getBossbarMessage() {
    return new UnlocalizedChatMessage(ChatColor.DARK_AQUA + "{0}", new LocalizedChatMessage(ChatConstant.UI_CYCLING_TIMER,
            new UnlocalizedChatMessage(ChatColor.AQUA + GameHandler.getGameHandler().getCycle().getMap().getName() + ChatColor.DARK_AQUA),
            new LocalizedChatMessage(getTime() == 1 ? ChatConstant.UI_SECOND : ChatConstant.UI_SECONDS, ChatColor.DARK_RED + "" + getTime() + ChatColor.DARK_AQUA)));
}
 
Example 15
Source File: CycleTimer.java    From CardinalPGM with MIT License 4 votes vote down vote up
@Override
public ChatMessage getBossbarEndMessage() {
    return new UnlocalizedChatMessage(ChatColor.DARK_AQUA + "{0}", new LocalizedChatMessage(ChatConstant.UI_CYCLED_TO, ChatColor.AQUA + GameHandler.getGameHandler().getCycle().getMap().getName()));
}
 
Example 16
Source File: SpectatorTools.java    From CardinalPGM with MIT License 4 votes vote down vote up
public static String getSpectatorMenuTitle(String locale) {
    String title = ChatColor.DARK_AQUA + new LocalizedChatMessage(ChatConstant.UI_SPECTATOR_TOOLS).getMessage(locale);
    return title.length() > 32 ? title.substring(0, 32) : title;
}
 
Example 17
Source File: SpectatorTools.java    From CardinalPGM with MIT License 4 votes vote down vote up
public static String getTeamsMenuTitle(String locale) {
    String title = ChatColor.DARK_AQUA + new LocalizedChatMessage(ChatConstant.UI_TEAMS).getMessage(locale);
    return title.length() > 32 ? title.substring(0, 32) : title;
}
 
Example 18
Source File: SpectatorTools.java    From CardinalPGM with MIT License 4 votes vote down vote up
public static String getTeleportMenuTitle(String locale) {
    String title = ChatColor.DARK_AQUA + new LocalizedChatMessage(ChatConstant.UI_TELEPORT_TO_TEAM_MEMBER).getMessage(locale);
    return title.length() > 32 ? title.substring(0, 32) : title;
}
 
Example 19
Source File: SpectatorTools.java    From CardinalPGM with MIT License 4 votes vote down vote up
public static String getEffectsMenuTitle(String locale) {
    String title = ChatColor.DARK_AQUA + new LocalizedChatMessage(ChatConstant.UI_CHANGE_EFFECTS).getMessage(locale);
    return title.length() > 32 ? title.substring(0, 32) : title;
}
 
Example 20
Source File: MoonStick.java    From NBTEditor with GNU General Public License v3.0 4 votes vote down vote up
public MoonStick() {
	super("moon-stick", ChatColor.DARK_AQUA + "Moon Stick", 14000);
	setLore("§bA magic flying stick to controls time.",
			"§bUse outside.");
}