Skip to content

Commit

Permalink
Improve Extension handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Sep 30, 2024
1 parent c7406a0 commit 88b19ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/coreprotect/command/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.coreprotect.bukkit.BukkitAdapter;
import net.coreprotect.config.Config;
import net.coreprotect.config.ConfigHandler;
import net.coreprotect.extensions.Extensions;
import net.coreprotect.language.Phrase;
import net.coreprotect.language.Selector;
import net.coreprotect.model.BlockGroup;
Expand Down Expand Up @@ -1280,7 +1281,7 @@ else if (corecommand.equals("migrate-db")) {
else {
try {
Class.forName("net.coreprotect.extensions.DatabaseMigration");
net.coreprotect.extensions.DatabaseMigration.runCommand(user, argumentArray);
Extensions.runDatabaseMigration(user, argumentArray);
}
catch (Exception e) {
// plugin not compiled with extension
Expand Down
Empty file.
11 changes: 11 additions & 0 deletions src/main/java/net/coreprotect/extensions/Extensions.java
Original file line number Diff line number Diff line change
@@ -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);
}

}

0 comments on commit 88b19ef

Please sign in to comment.