Add WeatherType Rain alias.

This commit is contained in:
Olof Larsson 2016-03-17 20:38:16 +01:00
parent 8b88dbe15b
commit dc89b439a0

View File

@ -1,7 +1,11 @@
package com.massivecraft.massivecore.command.type.enumeration; package com.massivecraft.massivecore.command.type.enumeration;
import java.util.Set;
import org.bukkit.WeatherType; import org.bukkit.WeatherType;
import com.massivecraft.massivecore.collections.MassiveSet;
public class TypeWeatherType extends TypeEnum<WeatherType> public class TypeWeatherType extends TypeEnum<WeatherType>
{ {
// -------------------------------------------- // // -------------------------------------------- //
@ -15,4 +19,21 @@ public class TypeWeatherType extends TypeEnum<WeatherType>
super(WeatherType.class); super(WeatherType.class);
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public Set<String> getNamesInner(WeatherType value)
{
Set<String> ret = new MassiveSet<String>(super.getNamesInner(value));
if (value == WeatherType.DOWNFALL)
{
ret.add("Rain");
}
return ret;
}
} }