Build against Paper 1.21.4

This commit is contained in:
Intelli 2025-03-12 14:29:45 -06:00
parent 484614f71e
commit 06f63459ac
4 changed files with 6 additions and 7 deletions

View file

@ -0,0 +1,23 @@
package net.coreprotect.utility;
import java.lang.reflect.Method;
import org.bukkit.command.CommandSender;
import net.coreprotect.language.Phrase;
public class Extensions {
public static void runDatabaseMigration(String command, CommandSender user, String[] argumentArray) {
try {
Class<?> patchClass = Class.forName("net.coreprotect.extensions.DatabaseMigration");
Method patchMethod = patchClass.getDeclaredMethod("runCommand", CommandSender.class, String[].class);
patchMethod.invoke(null, user, argumentArray);
}
catch (Exception e) {
// plugin not compiled with extension
Chat.sendMessage(user, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.COMMAND_NOT_FOUND, Color.WHITE, "/co " + command));
}
}
}