Improve Extension handling

This commit is contained in:
Intelli 2024-09-29 18:56:07 -06:00
parent c7406a01a7
commit 88b19efc89
3 changed files with 13 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import org.bukkit.entity.Player;
import net.coreprotect.bukkit.BukkitAdapter; import net.coreprotect.bukkit.BukkitAdapter;
import net.coreprotect.config.Config; import net.coreprotect.config.Config;
import net.coreprotect.config.ConfigHandler; import net.coreprotect.config.ConfigHandler;
import net.coreprotect.extensions.Extensions;
import net.coreprotect.language.Phrase; import net.coreprotect.language.Phrase;
import net.coreprotect.language.Selector; import net.coreprotect.language.Selector;
import net.coreprotect.model.BlockGroup; import net.coreprotect.model.BlockGroup;
@ -1280,7 +1281,7 @@ public class CommandHandler implements CommandExecutor {
else { else {
try { try {
Class.forName("net.coreprotect.extensions.DatabaseMigration"); Class.forName("net.coreprotect.extensions.DatabaseMigration");
net.coreprotect.extensions.DatabaseMigration.runCommand(user, argumentArray); Extensions.runDatabaseMigration(user, argumentArray);
} }
catch (Exception e) { catch (Exception e) {
// plugin not compiled with extension // plugin not compiled with extension

View File

@ -0,0 +1,11 @@
package net.coreprotect.extensions;
import org.bukkit.command.CommandSender;
public class Extensions {
public static void runDatabaseMigration(CommandSender user, String[] argumentArray) {
DatabaseMigration.runCommand(user, argumentArray);
}
}