2015-11-15 23:32:04 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.blocking.command;
|
2015-10-19 17:43:46 +00:00
|
|
|
|
|
|
|
public enum CommandBlockerAction
|
|
|
|
{
|
2015-11-22 18:26:47 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
BLOCK("b"),
|
|
|
|
BLOCK_AND_EJECT("a"),
|
|
|
|
BLOCK_UNKNOWN("u");
|
|
|
|
private final String token;
|
|
|
|
|
2020-12-04 00:28:53 +00:00
|
|
|
CommandBlockerAction(String token)
|
2015-10-19 17:43:46 +00:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
2020-12-04 00:28:53 +00:00
|
|
|
}
|