mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 20:46:41 +00:00
fix wildcard and clean up command executor
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
@ -41,6 +42,16 @@ public class CommandLoader extends FreedomService
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isAlias(String alias)
|
||||
{
|
||||
for (FreedomCommand command : commands)
|
||||
{
|
||||
if (Arrays.asList(command.getAliases().split(",")).contains(alias))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getCommandAmount()
|
||||
{
|
||||
return commands.size();
|
||||
|
Reference in New Issue
Block a user