Lots of fixes and cool shit

- Fixes bug that caused login messages to not show properly
- Fixes bug that caused names to now show properly in tab
- Adds the ability for commands to be ignored if plugins that they require aren't present
- Fixes bug that caused the admin list to fail to load properly
- Fixes bug that caused tags to not show properly
- Login messages now use MiniMessage
This commit is contained in:
Video
2023-03-30 23:14:57 -06:00
parent 74408b85bf
commit f53ba1bd76
34 changed files with 139 additions and 56 deletions

View File

@ -63,10 +63,25 @@ public class CommandLoader extends FreedomService
Set<Class<? extends FreedomCommand>> commandClasses = commandDir.getSubTypesOf(FreedomCommand.class);
commandLoading:
for (Class<? extends FreedomCommand> commandClass : commandClasses)
{
try
{
if (commandClass.isAnnotationPresent(CommandDependencies.class))
{
String[] dependencies = commandClass.getAnnotation(CommandDependencies.class).value();
for (String plugin : dependencies)
{
if (!server.getPluginManager().isPluginEnabled(plugin))
{
FLog.warning("Not loading command due to missing dependency (" + plugin + "): /" + commandClass.getSimpleName().replace("Command_", ""));
continue commandLoading;
}
}
}
add(commandClass.newInstance());
}
catch (InstantiationException | IllegalAccessException | ExceptionInInitializerError ex)