mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-03 08:26:42 +00:00
Prevent all commands from being loaded
This commit is contained in:
@ -22,13 +22,23 @@ public class CommandHandler extends PlexBase
|
||||
try
|
||||
{
|
||||
System annotation = clazz.getDeclaredAnnotation(System.class);
|
||||
if (annotation != null && annotation.value().equalsIgnoreCase(plugin.getSystem()))
|
||||
if (annotation != null)
|
||||
{
|
||||
if (annotation.value().equalsIgnoreCase(plugin.getSystem()))
|
||||
{
|
||||
commands.add(clazz.getConstructor().newInstance());
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.config.getBoolean("debug") && annotation.debug())
|
||||
{
|
||||
commands.add(clazz.getConstructor().newInstance());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
commands.add(clazz.getConstructor().newInstance());
|
||||
return;
|
||||
}
|
||||
|
||||
commands.add(clazz.getConstructor().newInstance());
|
||||
}
|
||||
catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user