mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-11-21 01:13:45 +08:00
Improve Extension handling
This commit is contained in:
parent
c7406a01a7
commit
88b19efc89
@ -24,6 +24,7 @@ import org.bukkit.entity.Player;
|
||||
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;
|
||||
@ -1280,7 +1281,7 @@ public class CommandHandler implements CommandExecutor {
|
||||
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
|
||||
|
11
src/main/java/net/coreprotect/extensions/Extensions.java
Normal file
11
src/main/java/net/coreprotect/extensions/Extensions.java
Normal 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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user