mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 04:26:42 +00:00
Lombok implementation removal. I have also gone through and replaced things with inline methods and variables, lambdas, and simplified loops down, removed unnecessary guard clauses, and overall cleaned up every single class. This took a long time, please do remember to follow proper naming conventions, don't include unnecessary guard clauses, follow exception rules and comment rules, and please PLEASE remember to use the DIAMOND OPERATOR rather than just inferring RAW TYPES!!! Thank you!!
32 lines
652 B
Java
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 static CommandBlockerAction fromToken(String token)
|
|
{
|
|
for (CommandBlockerAction action : CommandBlockerAction.values())
|
|
{
|
|
if (action.getToken().equalsIgnoreCase(token))
|
|
{
|
|
return action;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public String getToken()
|
|
{
|
|
return this.token;
|
|
}
|
|
} |