mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-19 22:05:01 +00:00
32 lines
658 B
Java
32 lines
658 B
Java
|
package me.totalfreedom.totalfreedommod.commandblocker;
|
||
|
|
||
|
public enum CommandBlockerAction
|
||
|
{
|
||
|
BLOCK("b"),
|
||
|
BLOCK_AND_EJECT("a"),
|
||
|
BLOCK_UNKNOWN("u");
|
||
|
private final String token;
|
||
|
|
||
|
private CommandBlockerAction(String token)
|
||
|
{
|
||
|
this.token = token;
|
||
|
}
|
||
|
|
||
|
public String getToken()
|
||
|
{
|
||
|
return this.token;
|
||
|
}
|
||
|
|
||
|
public static CommandBlockerAction fromToken(String token)
|
||
|
{
|
||
|
for (CommandBlockerAction action : CommandBlockerAction.values())
|
||
|
{
|
||
|
if (action.getToken().equalsIgnoreCase(token))
|
||
|
{
|
||
|
return action;
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
}
|