diff --git a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java index 348e3e52..a6f20e5a 100644 --- a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java +++ b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java @@ -2,7 +2,9 @@ package com.massivecraft.massivecore.command.type.enumeration; import java.util.Set; +import org.bukkit.ChatColor; import org.bukkit.WeatherType; +import org.bukkit.command.CommandSender; import com.massivecraft.massivecore.collections.MassiveSet; @@ -23,16 +25,44 @@ public class TypeWeatherType extends TypeEnum // OVERRIDE // -------------------------------------------- // + @Override + public ChatColor getVisualColor(WeatherType value, CommandSender sender) + { + if (value == null) return ChatColor.GRAY; + if (value == WeatherType.CLEAR) return ChatColor.GREEN; + return ChatColor.RED; + } + + @Override + public String getNameInner(WeatherType value) + { + switch (value) + { + case DOWNFALL: return "Rain"; + case CLEAR: return "Sun"; + } + throw new RuntimeException(); + } + @Override public Set getNamesInner(WeatherType value) { - Set ret = new MassiveSet(super.getNamesInner(value)); + Set ret = new MassiveSet(); - if (value == WeatherType.DOWNFALL) + switch (value) { - ret.add("Rain"); + case DOWNFALL: + ret.add("Rain"); + ret.add("Storm"); + break; + case CLEAR: + ret.add("Sun"); + ret.add("Sky"); + break; } + ret.addAll(super.getNamesInner(value)); + return ret; }