mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-03-26 04:51:31 +01:00
17 lines
381 B
Java
17 lines
381 B
Java
|
package com.minelittlepony.unicopia.command;
|
||
|
|
||
|
import net.minecraft.util.StringIdentifiable;
|
||
|
|
||
|
public interface CommandArgumentEnum<T extends Enum<T> & CommandArgumentEnum<T>> extends StringIdentifiable {
|
||
|
|
||
|
@SuppressWarnings("unchecked")
|
||
|
default T asSelf() {
|
||
|
return (T)this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
default String asString() {
|
||
|
return asSelf().name();
|
||
|
}
|
||
|
}
|