From dc89b439a0f05975b975fd347a2ecae13d633494 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 17 Mar 2016 20:38:16 +0100 Subject: [PATCH] Add WeatherType Rain alias. --- .../type/enumeration/TypeWeatherType.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java index 14c1396e..348e3e52 100644 --- a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java +++ b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWeatherType.java @@ -1,7 +1,11 @@ package com.massivecraft.massivecore.command.type.enumeration; +import java.util.Set; + import org.bukkit.WeatherType; +import com.massivecraft.massivecore.collections.MassiveSet; + public class TypeWeatherType extends TypeEnum { // -------------------------------------------- // @@ -14,5 +18,22 @@ public class TypeWeatherType extends TypeEnum { super(WeatherType.class); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + + @Override + public Set getNamesInner(WeatherType value) + { + Set ret = new MassiveSet(super.getNamesInner(value)); + + if (value == WeatherType.DOWNFALL) + { + ret.add("Rain"); + } + + return ret; + } }