TypeGameMode now supports ordinals.

This commit is contained in:
Olof Larsson 2015-12-15 11:32:47 +01:00
parent 9a78535f80
commit d76c2125b9

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.GameMode; import org.bukkit.GameMode;
import com.massivecraft.massivecore.collections.MassiveSet;
public class TypeGameMode extends TypeEnum<GameMode> public class TypeGameMode extends TypeEnum<GameMode>
{ {
// -------------------------------------------- // // -------------------------------------------- //
@ -15,4 +19,19 @@ public class TypeGameMode extends TypeEnum<GameMode>
super(GameMode.class); super(GameMode.class);
} }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public Set<String> getIdsInner(GameMode value)
{
Set<String> ret = new MassiveSet<String>(super.getIdsInner(value));
String id = String.valueOf(value.ordinal());
ret.add(id);
return ret;
}
} }