TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/blocking/command/CommandBlockerAction.java
speed 293ea04c56 staff -> admins
* rename everything containing staff back to admin (as requested by ryan i've renamed commands like slconfig to saconfig but left "slconfig" as an alias)
* format almost every file correctly
* a few other improvements
2020-12-03 19:28:53 -05:00

32 lines
652 B
Java

package me.totalfreedom.totalfreedommod.blocking.command;
public enum CommandBlockerAction
{
BLOCK("b"),
BLOCK_AND_EJECT("a"),
BLOCK_UNKNOWN("u");
private final String token;
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;
}
}