Java Code Examples for org.bukkit.ChatColor#GREEN

The following examples show how to use org.bukkit.ChatColor#GREEN . 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: ScoreboardManager.java    From UhcCore with GNU General Public License v3.0 6 votes vote down vote up
public String getScoreboardLine(int line){
    if (line == 0) return ChatColor.UNDERLINE + "" + ChatColor.RESET;
    if (line == 1) return ChatColor.ITALIC + "" + ChatColor.RESET;
    if (line == 2) return ChatColor.BOLD + "" + ChatColor.RESET;
    if (line == 3) return ChatColor.RESET + "" + ChatColor.RESET;
    if (line == 4) return ChatColor.GREEN + "" + ChatColor.RESET;
    if (line == 5) return ChatColor.DARK_GRAY + "" + ChatColor.RESET;
    if (line == 6) return ChatColor.GOLD + "" + ChatColor.RESET;
    if (line == 7) return ChatColor.RED + "" + ChatColor.RESET;
    if (line == 8) return ChatColor.YELLOW + "" + ChatColor.RESET;
    if (line == 9) return ChatColor.WHITE + "" + ChatColor.RESET;
    if (line == 10) return ChatColor.DARK_GREEN + "" + ChatColor.RESET;
    if (line == 11) return ChatColor.BLUE + "" + ChatColor.RESET;
    if (line == 12) return ChatColor.STRIKETHROUGH + "" + ChatColor.RESET;
    if (line == 13) return ChatColor.MAGIC + "" + ChatColor.RESET;
    if (line == 14) return ChatColor.DARK_RED + "" + ChatColor.RESET;
    return null;
}
 
Example 2
Source File: PingArgument.java    From Hawk with GNU General Public License v3.0 6 votes vote down vote up
private ChatColor pingZoneColor(int millis) {
    int zone = millis / 50;
    if(zone < 1) {
        return ChatColor.AQUA;
    }
    if(zone < 2) {
        return ChatColor.GREEN;
    }
    if(zone < 3) {
        return ChatColor.YELLOW;
    }
    if(zone < 4) {
        return ChatColor.GOLD;
    }
    return ChatColor.RED;
}
 
Example 3
Source File: ListCmd.java    From SkyWarsReloaded with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean run() {
	if (GameKit.getKits().size() < 1) {
		player.sendMessage(new Messaging.MessageFormatter().format("command.kit-listno"));
		return true;
	}
	player.sendMessage(new Messaging.MessageFormatter().format("command.kit-listheader"));
	player.sendMessage(new Messaging.MessageFormatter().format("command.kit-listheader2"));
	for (GameKit kit: GameKit.getKits()) {
		if (!kit.getName().equalsIgnoreCase(new Messaging.MessageFormatter().format("kit.vote-random")) &&
				!kit.getName().equalsIgnoreCase(new Messaging.MessageFormatter().format("kit.vote-nokit"))) {
			String message;
			if (kit.getEnabled()) {
				message = ChatColor.GREEN + "enabled";
			} else {
				message = ChatColor.RED + "disabled";
			}
			player.sendMessage(new Messaging.MessageFormatter().setVariable("filename", kit.getFilename())
					.setVariable("position", "" + kit.getPosition()).setVariable("status", message).format("command.kit-list"));
		}

	}
	return true;
}
 
Example 4
Source File: CommandHandler.java    From NyaaUtils with MIT License 5 votes vote down vote up
private ChatColor tpsColor(double tps) {
    if (tps >= 19) {
        return ChatColor.GREEN;
    } else if (tps >= 17) {
        return ChatColor.DARK_GREEN;
    } else if (tps >= 15) {
        return ChatColor.YELLOW;
    } else if (tps >= 10) {
        return ChatColor.GOLD;
    }
    return ChatColor.RED;
}
 
Example 5
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 6
Source File: LogicalNAND.java    From NeuralNetworkAPI with GNU General Public License v3.0 5 votes vote down vote up
public String learn() {
	/**
	 * Simple explanation of these steps:
	 * 
	 * 1) If it is currently learning, change the inputs to either true or false.
	 * 
	 * 2) Let the NN tick and think. This will return the outputs from the OutpuitNeurons
	 * 
	 * 3) If it is not learning, just return the answer.
	 * 
	 * 4) Else, do the logic and see if the answer it gave (thought[0]) was correct.
	 * 
	 * 5) If it was not correct, use the DeepReinforcementUtil to improve it.
	 * 
	 * 6) After inprovement, return a message with if it was correct, the accuracy, the inputs, and what it thought was the output,
	 */
	binary.changeValueAt(0, 0,
			ThreadLocalRandom.current().nextBoolean());
	binary.changeValueAt(0, 1,
			ThreadLocalRandom.current().nextBoolean());
	boolean[] thought = tickAndThink();
	boolean logic = !(binary.getBooleanAt(0, 0)&& binary.getBooleanAt(0, 1));
	boolean wasCorrect = (logic == thought[0]);
	this.getAccuracy().addEntry(wasCorrect);

	// IMPROVE IT
	HashMap<Neuron, Double> map = new HashMap<>();
	for (int i = 0; i < thought.length; i++)
		map.put(ai.getNeuronFromId(i), logic ? 1.0 : -1.0);
	if (!wasCorrect)
		DeepReinforcementUtil.instantaneousReinforce(this, map,1);

	return (wasCorrect ? ChatColor.GREEN : ChatColor.RED) + "acc "
			+ getAccuracy().getAccuracyAsInt() + "|"
			+ binary.getBooleanAt(0, 0) + " + " + binary.getBooleanAt(0, 1)
			+ " ~~ " + thought[0];
	
}
 
Example 7
Source File: LogicalOR.java    From NeuralNetworkAPI with GNU General Public License v3.0 5 votes vote down vote up
public String learn() {
	/**
	 * Simple explanation of these steps:
	 * 
	 * 1) If it is currently learning, change the inputs to either true or false.
	 * 
	 * 2) Let the NN tick and think. This will return the outputs from the OutpuitNeurons
	 * 
	 * 3) If it is not learning, just return the answer.
	 * 
	 * 4) Else, do the logic and see if the answer it gave (thought[0]) was correct.
	 * 
	 * 5) If it was not correct, use the DeepReinforcementUtil to improve it.
	 * 
	 * 6) After inprovement, return a message with if it was correct, the accuracy, the inputs, and what it thought was the output,
	 */
	binary.changeValueAt(0, 0,
			ThreadLocalRandom.current().nextBoolean());
	binary.changeValueAt(0, 1,
			ThreadLocalRandom.current().nextBoolean());
	boolean[] thought = tickAndThink();
	boolean logic = (binary.getBooleanAt(0, 0) || binary.getBooleanAt(0, 1));
	boolean wasCorrect = (logic == thought[0]);
	this.getAccuracy().addEntry(wasCorrect);

	// IMPROVE IT
	HashMap<Neuron, Double> map = new HashMap<>();
	for (int i = 0; i < thought.length; i++)
		map.put(ai.getNeuronFromId(i), logic ? 1.0 : -1.0);
	if (!wasCorrect)
		DeepReinforcementUtil.instantaneousReinforce(this, map,1);

	return (wasCorrect ? ChatColor.GREEN : ChatColor.RED) + "acc "
			+ getAccuracy().getAccuracyAsInt() + "|"
			+ binary.getBooleanAt(0, 0) + " + " + binary.getBooleanAt(0, 1)
			+ " ~~ " + thought[0];
	
}
 
Example 8
Source File: LogicalXNOR.java    From NeuralNetworkAPI with GNU General Public License v3.0 5 votes vote down vote up
public String learn() {

		/**
		 * Simple explanation of these steps:
		 * 
		 * 1) If it is currently learning, change the inputs to either true or false.
		 * 
		 * 2) Let the NN tick and think. This will return the outputs from the
		 * OutpuitNeurons
		 * 
		 * 3) If it is not learning, just return the answer.
		 * 
		 * 4) Else, do the logic and see if the answer it gave (thought[0]) was correct.
		 * 
		 * 5) If it was not correct, use the DeepReinforcementUtil to improve it.
		 * 
		 * 6) After inprovement, return a message with if it was correct, the accuracy,
		 * the inputs, and what it thought was the output,
		 */
		binary.changeValueAt(0, 0, ThreadLocalRandom.current().nextBoolean());
		binary.changeValueAt(0, 1, ThreadLocalRandom.current().nextBoolean());
		boolean[] thought = tickAndThink();
		boolean logic = (binary.getBooleanAt(0, 0) == binary.getBooleanAt(0, 1));
		boolean result = logic == thought[0];
		this.getAccuracy().addEntry(result);

		// IMPROVE IT
		HashMap<Neuron, Double> map = new HashMap<>();
		for (int i = 0; i < thought.length; i++)
			map.put(ai.getNeuronFromId(i), logic ? 1 : -1.0);
		if (!result)
			DeepReinforcementUtil.instantaneousReinforce(this, map, 1);
		return ((result ? ChatColor.GREEN : ChatColor.RED) + "acc " + getAccuracy().getAccuracyAsInt() + "|"
				+ binary.getBooleanAt(0, 0) + " + " + binary.getBooleanAt(0, 1) + " ~~ " + thought[0]);

	}
 
Example 9
Source File: ChatUtil.java    From CardinalPGM with MIT License 5 votes vote down vote up
public static ChatColor getTimerColor(double time) {
    if (time <= 5) {
        return ChatColor.DARK_RED;
    } else if (time <= 30) {
        return ChatColor.GOLD;
    } else if (time <= 60) {
        return ChatColor.YELLOW;
    } else {
        return ChatColor.GREEN;
    }
}
 
Example 10
Source File: LogicalNOR.java    From NeuralNetworkAPI with GNU General Public License v3.0 5 votes vote down vote up
public String learn() {
	/**
	 * Simple explanation of these steps:
	 * 
	 * 1) If it is currently learning, change the inputs to either true or false.
	 * 
	 * 2) Let the NN tick and think. This will return the outputs from the OutpuitNeurons
	 * 
	 * 3) If it is not learning, just return the answer.
	 * 
	 * 4) Else, do the logic and see if the answer it gave (thought[0]) was correct.
	 * 
	 * 5) If it was not correct, use the DeepReinforcementUtil to improve it.
	 * 
	 * 6) After inprovement, return a message with if it was correct, the accuracy, the inputs, and what it thought was the output,
	 */
	binary.changeValueAt(0, 0,
			ThreadLocalRandom.current().nextBoolean());
	binary.changeValueAt(0, 1,
			ThreadLocalRandom.current().nextBoolean());
	boolean[] thought = tickAndThink();
	boolean logic = !(binary.getBooleanAt(0, 0) || binary.getBooleanAt(0, 1));
	boolean wasCorrect = (logic == thought[0]);
	this.getAccuracy().addEntry(wasCorrect);

	// IMPROVE IT
	HashMap<Neuron, Double> map = new HashMap<>();
	for (int i = 0; i < thought.length; i++)
		map.put(ai.getNeuronFromId(i), logic ? 1.0 : -1.0);
	if (!wasCorrect)
		DeepReinforcementUtil.instantaneousReinforce(this, map,1);

	return (wasCorrect ? ChatColor.GREEN : ChatColor.RED) + "acc "
			+ getAccuracy().getAccuracyAsInt() + "|"
			+ binary.getBooleanAt(0, 0) + " + " + binary.getBooleanAt(0, 1)
			+ " ~~ " + thought[0];
	
}
 
Example 11
Source File: LogicalAND.java    From NeuralNetworkAPI with GNU General Public License v3.0 5 votes vote down vote up
public String learn() {
	/**
	 * Simple explanation of these steps:
	 * 
	 * 1) If it is currently learning, change the inputs to either true or false.
	 * 
	 * 2) Let the NN tick and think. This will return the outputs from the OutpuitNeurons
	 * 
	 * 3) If it is not learning, just return the answer.
	 * 
	 * 4) Else, do the logic and see if the answer it gave (thought[0]) was correct.
	 * 
	 * 5) If it was not correct, use the DeepReinforcementUtil to improve it.
	 * 
	 * 6) After inprovement, return a message with if it was correct, the accuracy, the inputs, and what it thought was the output,
	 */
	binary.changeValueAt(0, 0,
			ThreadLocalRandom.current().nextBoolean());
	binary.changeValueAt(0, 1,
			ThreadLocalRandom.current().nextBoolean());
	boolean[] thought = tickAndThink();
	boolean logic = (binary.getBooleanAt(0, 0) && binary.getBooleanAt(0, 1));
	boolean wasCorrect = (logic == thought[0]);
	this.getAccuracy().addEntry(wasCorrect);

	// IMPROVE IT
	HashMap<Neuron, Double> map = new HashMap<>();
	for (int i = 0; i < thought.length; i++)
		map.put(ai.getNeuronFromId(i), logic ? 1.0 : -1.0);
	if (!wasCorrect)
		DeepReinforcementUtil.instantaneousReinforce(this, map,1);

	return (wasCorrect ? ChatColor.GREEN : ChatColor.RED) + "acc "
			+ getAccuracy().getAccuracyAsInt() + "|"
			+ binary.getBooleanAt(0, 0) + " + " + binary.getBooleanAt(0, 1)
			+ " ~~ " + thought[0];
	
}
 
Example 12
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 13
Source File: NumberUtils.java    From Slimefun4 with GNU General Public License v3.0 5 votes vote down vote up
public static ChatColor getColorFromPercentage(float percentage) {
    if (percentage < 16.0F) return ChatColor.DARK_RED;
    else if (percentage < 32.0F) return ChatColor.RED;
    else if (percentage < 48.0F) return ChatColor.GOLD;
    else if (percentage < 64.0F) return ChatColor.YELLOW;
    else if (percentage < 80.0F) return ChatColor.DARK_GREEN;
    else return ChatColor.GREEN;
}
 
Example 14
Source File: CauldronCommand.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
private boolean getToggle(CommandSender sender, String[] args)
{
    try
    {
        Setting toggle = MinecraftServer.getServer().cauldronConfig.getSettings().get(args[1]);
        // check config directly
        if (toggle == null && MinecraftServer.getServer().cauldronConfig.isSet(args[1]))
        {
            if (MinecraftServer.getServer().cauldronConfig.isBoolean(args[1]))
            {
                toggle = new BoolSetting(MinecraftServer.getServer().cauldronConfig, args[1], MinecraftServer.getServer().cauldronConfig.getBoolean(args[1], false), "");
            }
            else if (MinecraftServer.getServer().cauldronConfig.isInt(args[1]))
            {
                toggle = new IntSetting(MinecraftServer.getServer().cauldronConfig, args[1], MinecraftServer.getServer().cauldronConfig.getInt(args[1], 1), "");
            }
            if (toggle != null)
            {
                MinecraftServer.getServer().cauldronConfig.getSettings().put(toggle.path, toggle);
                MinecraftServer.getServer().cauldronConfig.load();
            }
        }
        if (toggle == null)
        {
            sender.sendMessage(ChatColor.RED + "Could not find option: " + args[1]);
            return false;
        }
        Object value = toggle.getValue();
        String option = (Boolean.TRUE.equals(value) ? ChatColor.GREEN : ChatColor.RED) + " " + value;
        sender.sendMessage(ChatColor.GOLD + args[1] + " " + option);
    }
    catch (Exception ex)
    {
        sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
        ex.printStackTrace();
    }
    return true;
}
 
Example 15
Source File: TileEntityCommand.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
private boolean setToggle(CommandSender sender, String[] args)
{
    try
    {
        Setting toggle = MinecraftServer.getServer().tileEntityConfig.getSettings().get(args[1]);
        // check config directly
        if (toggle == null && MinecraftServer.getServer().tileEntityConfig.isSet(args[1]))
        {
            toggle = new BoolSetting(MinecraftServer.getServer().tileEntityConfig, args[1], MinecraftServer.getServer().tileEntityConfig.getBoolean(args[1], false), "");
            MinecraftServer.getServer().tileEntityConfig.getSettings().put(toggle.path, toggle);
            MinecraftServer.getServer().tileEntityConfig.load();
        }
        if (toggle == null)
        {
            sender.sendMessage(ChatColor.RED + "Could not find option: " + args[1]);
            return false;
        }
        if (args.length == 2)
        {
            sender.sendMessage(ChatColor.RED + "Usage: " + args[0] + " " + args[1] + " [value]");
            return false;
        }
        toggle.setValue(args[2]);
        Object value = toggle.getValue();
        String option = (Boolean.TRUE.equals(value) ? ChatColor.GREEN : ChatColor.RED) + " " + value;
        sender.sendMessage(ChatColor.GOLD + args[1] + " " + option);
        MinecraftServer.getServer().tileEntityConfig.save();
    }
    catch (Exception ex)
    {
        sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
        ex.printStackTrace();
    }
    return true;
}
 
Example 16
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 17
Source File: NumberAdder.java    From NeuralNetworkAPI with GNU General Public License v3.0 4 votes vote down vote up
public String learn() {
	boolean[] bbb = numberToBinaryBooleans((int) (Math.random() * (Math.pow(2, max_bytes))));
	boolean[] bbb2 = numberToBinaryBooleans((int) (Math.random() * (Math.pow(2, max_bytes))));
	for (int i = 0; i < bbb.length; i++) {
		this.binary.changeValueAt(0, i, (bbb[i]));
		((NumberAdder) base).binary.changeValueAt(1, i, (!bbb[i]));
	}
	for (int i = 0; i < bbb2.length; i++) {
		((NumberAdder) base).binary.changeValueAt(2, i, (bbb2[i]));
		((NumberAdder) base).binary.changeValueAt(3, i, (!bbb2[i]));
	}
	boolean[] thought = tickAndThink();

	boolean[] booleanBase = new boolean[10];
	for (int i = 0; i < 10; i++) {
		booleanBase[i] = base.binary.getBooleanAt(0, i);
	}

	boolean[] booleanBase2 = new boolean[10];
	for (int i = 0; i < 10; i++) {
		booleanBase2[i] = base.binary.getBooleanAt(2, i);
	}
	int number = binaryBooleansToNumber(booleanBase);
	int number2 = binaryBooleansToNumber(booleanBase2);
	int number3 = binaryBooleansToNumber(thought);

	boolean result = number + number2 == number3;
	boolean[] correctvalues = numberToBinaryBooleans(number + number2);

	this.getAccuracy().addEntry(result);

	StringBuilder sb = new StringBuilder();
	int amountOfMistakes = 0;
	for (int i = 0; i < Math.max(correctvalues.length, thought.length); i++) {
		if (i < thought.length && thought[i]) {
			sb.append((correctvalues.length > i && correctvalues[i] ? ChatColor.DARK_GREEN : ChatColor.DARK_RED)
					+ "+" + ((int) Math.pow(2, i)));
			if (!(correctvalues.length > i && correctvalues[i]))
				amountOfMistakes++;
		} else if (i < correctvalues.length && correctvalues[i]) {
			sb.append(ChatColor.GRAY + "+" + ((int) Math.pow(2, i)));
			amountOfMistakes++;
		}
	}

	// IMPROVE IT
	HashMap<Neuron, Double> map = new HashMap<>();
	for (int i = 0; i < thought.length; i++) {
		map.put(base.ai.getNeuronFromId(i), correctvalues.length > i && correctvalues[i] ? 1 : -1.0);
	}

	// amountOfMistakes = (int) Math.pow(2,amountOfMistakes);
	if (!result)
		DeepReinforcementUtil.instantaneousReinforce(base, map, amountOfMistakes);
	return ((result ? ChatColor.GREEN : ChatColor.RED) + "acc " + getAccuracy().getAccuracyAsInt() + "|" + number
			+ " + " + number2 + " = " + number3 + "|  " + sb.toString());
}
 
Example 18
Source File: TreeVaporizer.java    From NBTEditor with GNU General Public License v3.0 4 votes vote down vote up
public TreeVaporizer() {
	super("tree-vaporizer", ChatColor.GREEN + "Tree Vaporizer");
}
 
Example 19
Source File: WitherBow.java    From NBTEditor with GNU General Public License v3.0 4 votes vote down vote up
public WitherBow() {
	super("wither-bow", ChatColor.GREEN + "Wither Bow");
	setLore("§bA bow that shoots Wither Skulls.");
}
 
Example 20
Source File: HealthDisplay.java    From EliteMobs with GNU General Public License v3.0 3 votes vote down vote up
private static ChatColor setHealthColor(int currentHealth, int maxHealth) {

        double healthPercentage = currentHealth * 100 / maxHealth;

        if (healthPercentage > 75) {

            return ChatColor.DARK_GREEN;

        }

        if (healthPercentage > 50) {

            return ChatColor.GREEN;

        }

        if (healthPercentage > 25) {

            return ChatColor.RED;

        }

        if (healthPercentage > 0) {

            return ChatColor.DARK_RED;

        }

        return ChatColor.DARK_RED;

    }