From 83e16fafe8532ca43d3d13a424db24530ad32e92 Mon Sep 17 00:00:00 2001 From: Fox2Code Date: Tue, 3 Oct 2023 16:14:24 +0200 Subject: [PATCH] Update 1.2.19 --- api/build.gradle | 2 + .../net/minecraft/server/command/Command.java | 53 +++++++++++ .../server/command/CommandRegistry.java | 17 ++++ .../server/command/CommandSender.java | 13 +++ .../minecraft/server/command/IssuerRole.java | 6 ++ .../minecraft/server/plugin/JavaPlugin.java | 16 ++++ .../foxloader/launcher/FoxLauncher.java | 20 +++-- .../foxloader/launcher/LoggerHelper.java | 36 +++++++- .../fox2code/foxloader/loader/PreLoader.java | 16 ++-- .../ConsoleLogManagerTransformer.java | 24 +++++ .../foxloader/registry/CommandCompat.java | 3 +- .../java/net/minecraft/client/main/Main.java | 3 +- gradle.properties | 4 +- server/build.gradle | 3 + .../foxloader/loader/ServerModLoader.java | 17 +++- .../ServerCommandWrapper4ReIndevPatches.java | 87 +++++++++++++++++++ settings.gradle | 1 + 17 files changed, 301 insertions(+), 20 deletions(-) create mode 100644 api/build.gradle create mode 100644 api/src/main/java/net/minecraft/server/command/Command.java create mode 100644 api/src/main/java/net/minecraft/server/command/CommandRegistry.java create mode 100644 api/src/main/java/net/minecraft/server/command/CommandSender.java create mode 100644 api/src/main/java/net/minecraft/server/command/IssuerRole.java create mode 100644 api/src/main/java/net/minecraft/server/plugin/JavaPlugin.java create mode 100644 common/src/main/java/com/fox2code/foxloader/loader/transformer/ConsoleLogManagerTransformer.java create mode 100644 server/src/main/java/com/fox2code/foxloader/server/ServerCommandWrapper4ReIndevPatches.java diff --git a/api/build.gradle b/api/build.gradle new file mode 100644 index 0000000..84a2d11 --- /dev/null +++ b/api/build.gradle @@ -0,0 +1,2 @@ +group 'com.fox2code' +version project['foxloader.version'] diff --git a/api/src/main/java/net/minecraft/server/command/Command.java b/api/src/main/java/net/minecraft/server/command/Command.java new file mode 100644 index 0000000..1d69dcb --- /dev/null +++ b/api/src/main/java/net/minecraft/server/command/Command.java @@ -0,0 +1,53 @@ +package net.minecraft.server.command; + +// https://git.derekunavailable.direct/Dereku/ReIndevPatches +public abstract class Command { + + private final String commandLabel; + private final String[] aliases; + private IssuerRole canUseThisCommand = IssuerRole.BOTH; + + public Command(final String name) { + this.commandLabel = name; + this.aliases = new String[0]; + } + + public Command(final String name, final String[] aliases) { + this.commandLabel = name; + this.aliases = aliases; + } + + public abstract void execute(String commandLabel, String[] args, CommandSender commandSender); + + public String getCommandLabel() { + return commandLabel; + } + + public String[] getAliases() { + return aliases; + } + + public boolean onlyForOperators() { + return true; + } + + public boolean hideCommandArgs() { + return false; + } + + public IssuerRole getRoleToUseThisCommand() { + return canUseThisCommand; + } + + protected final void setIssuerRole(IssuerRole role) { + this.canUseThisCommand = role; + } + + protected final int parseInt(String input, int value) { + if (input.matches("-?[0-9]*")) { + return Integer.parseInt(input); + } else { + return value; + } + } +} diff --git a/api/src/main/java/net/minecraft/server/command/CommandRegistry.java b/api/src/main/java/net/minecraft/server/command/CommandRegistry.java new file mode 100644 index 0000000..6ebbade --- /dev/null +++ b/api/src/main/java/net/minecraft/server/command/CommandRegistry.java @@ -0,0 +1,17 @@ +package net.minecraft.server.command; + +import net.minecraft.server.plugin.JavaPlugin; + +public class CommandRegistry { + private static final CommandRegistry INSTANCE = new CommandRegistry(); + + private CommandRegistry() {} + + public static CommandRegistry getInstance() { + return INSTANCE; + } + + public boolean registerCommand(JavaPlugin owner, Command command, boolean override) { + return true; + } +} diff --git a/api/src/main/java/net/minecraft/server/command/CommandSender.java b/api/src/main/java/net/minecraft/server/command/CommandSender.java new file mode 100644 index 0000000..911186d --- /dev/null +++ b/api/src/main/java/net/minecraft/server/command/CommandSender.java @@ -0,0 +1,13 @@ +package net.minecraft.server.command; + + +// https://git.derekunavailable.direct/Dereku/ReIndevPatches +public class CommandSender { + public boolean isPlayer() { + return false; + } + + public void sendMessage(String message) {} + + /* public EntityPlayerMP getPlayer(); */ +} diff --git a/api/src/main/java/net/minecraft/server/command/IssuerRole.java b/api/src/main/java/net/minecraft/server/command/IssuerRole.java new file mode 100644 index 0000000..5e792e1 --- /dev/null +++ b/api/src/main/java/net/minecraft/server/command/IssuerRole.java @@ -0,0 +1,6 @@ +package net.minecraft.server.command; + +// https://git.derekunavailable.direct/Dereku/ReIndevPatches +public enum IssuerRole { + CONSOLE, PLAYER, BOTH +} \ No newline at end of file diff --git a/api/src/main/java/net/minecraft/server/plugin/JavaPlugin.java b/api/src/main/java/net/minecraft/server/plugin/JavaPlugin.java new file mode 100644 index 0000000..07997b7 --- /dev/null +++ b/api/src/main/java/net/minecraft/server/plugin/JavaPlugin.java @@ -0,0 +1,16 @@ +package net.minecraft.server.plugin; + +import net.minecraft.server.command.Command; +import net.minecraft.server.command.CommandRegistry; + +// https://git.derekunavailable.direct/Dereku/ReIndevPatches +public class JavaPlugin { + @Deprecated + public String getName() { + throw new UnsupportedOperationException(); + } + + public boolean registerCommand(Command command, boolean override) { + return CommandRegistry.getInstance().registerCommand(this, command, override); + } +} diff --git a/common/src/main/java/com/fox2code/foxloader/launcher/FoxLauncher.java b/common/src/main/java/com/fox2code/foxloader/launcher/FoxLauncher.java index 64d3580..f095e88 100644 --- a/common/src/main/java/com/fox2code/foxloader/launcher/FoxLauncher.java +++ b/common/src/main/java/com/fox2code/foxloader/launcher/FoxLauncher.java @@ -6,6 +6,7 @@ import java.io.File; import java.net.URL; import java.util.HashMap; +import java.util.logging.Logger; public class FoxLauncher { static { @@ -36,6 +37,7 @@ public class FoxLauncher { static File gameDir; public static String initialUsername; public static String initialSessionId; + private static boolean hasLogger = false; public static void markWronglyInstalled() { if (foxClassLoader == null) wronglyInstalled = true; @@ -95,7 +97,7 @@ static void initForClientFromArgs(String[] args) { foxClassLoader.addTransformerExclusion("org.spongepowered.tools."); foxClassLoader.addTransformerExclusion("com.llamalad7.mixinextras."); foxClassLoader.addTransformerExclusion("com.fox2code.foxloader.loader."); - installLoggerHelper(); // Install special logger before libraries loading + installLoggerHelper(true); // Install special logger before libraries loading DependencyHelper.loadDependencies(true); } @@ -120,11 +122,12 @@ static void initForServerFromArgs(String[] args) { foxClassLoader.addTransformerExclusion("org.spongepowered.tools."); foxClassLoader.addTransformerExclusion("com.llamalad7.mixinextras."); foxClassLoader.addTransformerExclusion("com.fox2code.foxloader.loader."); - installLoggerHelper(); // Install special logger before libraries loading + installLoggerHelper(false); // Install special logger before libraries loading DependencyHelper.loadDependencies(false); } - private static void installLoggerHelper() { + private static void installLoggerHelper(boolean client) { + if (hasLogger) return; boolean installed = false; try { File logFile = new File(gameDir, (LoggerHelper.devEnvironment ? @@ -134,6 +137,11 @@ private static void installLoggerHelper() { if (!installed) { System.out.println("Failed to install log helper!"); } + hasLogger = installed; + } + + public static void installLoggerHelperOn(Logger logger) { + if (hasLogger) LoggerHelper.installOn(logger); } public static void setEarlyMinecraftURL(URL url) { @@ -145,9 +153,9 @@ public static void setEarlyMinecraftURL(URL url) { } private static boolean isDirGradle(File file) { - return new File(gameDir, "gradle").exists() && ( - new File(gameDir, "build.gradle.kts").exists() || - new File(gameDir, "build.gradle").exists()); + return new File(file, "gradle").exists() && ( + new File(file, "build.gradle.kts").exists() || + new File(file, "build.gradle").exists()); } static void runClientWithArgs(String[] args) throws ReflectiveOperationException { diff --git a/common/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java b/common/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java index d338919..c0f3c03 100644 --- a/common/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java +++ b/common/src/main/java/com/fox2code/foxloader/launcher/LoggerHelper.java @@ -1,5 +1,6 @@ package com.fox2code.foxloader.launcher; +import com.fox2code.foxloader.launcher.utils.Platform; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -16,9 +17,13 @@ final class LoggerHelper { FoxLauncher.foxLoaderFile.getAbsolutePath().replace('\\', '/').endsWith( // Also check for IDE launch. "/common/build/libs/common-" + BuildConfig.FOXLOADER_VERSION + ".jar"); private static final boolean consoleSupportColor = devEnvironment || - Boolean.getBoolean("foxloader.console-support-color"); + Boolean.getBoolean("foxloader.console-support-color") || + (Platform.getPlatform() != Platform.WINDOWS && System.console() != null); private static final boolean disableLoggerHelper = Boolean.getBoolean("foxloader.disable-logger-helper"); + private static final FoxLoaderLogFormatter simpleFormatter = new FoxLoaderLogFormatter(); + private static SystemOutConsoleHandler systemOutConsoleHandler; + private static DirectFileHandler directFileHandler; static boolean install(File logFile) { if (disableLoggerHelper) { @@ -37,7 +42,6 @@ static boolean install(File logFile) { } boolean installed = false; final SystemOutConsoleHandler systemOutConsoleHandler = new SystemOutConsoleHandler(); - final FoxLoaderLogFormatter simpleFormatter = new FoxLoaderLogFormatter(); final Logger rootLogger = LogManager.getLogManager().getLogger(""); final DirectFileHandler directFileHandler; try { @@ -46,6 +50,8 @@ static boolean install(File logFile) { } catch (Exception ignored) { return false; } + LoggerHelper.systemOutConsoleHandler = systemOutConsoleHandler; + LoggerHelper.directFileHandler = directFileHandler; Runtime.getRuntime().addShutdownHook(new Thread(() -> { directFileHandler.flush(); systemOutConsoleHandler.flush(); @@ -57,7 +63,7 @@ static boolean install(File logFile) { rootLogger.removeHandler(handler); rootLogger.addHandler(systemOutConsoleHandler); } else { - handler.setFormatter(simpleFormatter); + handler.setFormatter(LoggerHelper.simpleFormatter); } } if (installed) { @@ -69,6 +75,24 @@ static boolean install(File logFile) { return installed; } + static void installOn(Logger logger) { + Handler[] handlers = logger.getHandlers(); + boolean hasDirectFileHandler = false; + for (Handler handler : handlers) { + if (handler instanceof ConsoleHandler) { + if (handler != systemOutConsoleHandler) { + logger.removeHandler(handler); + logger.addHandler(systemOutConsoleHandler); + } + } else if (handler == directFileHandler) { + hasDirectFileHandler = true; + } + } + if (!logger.getUseParentHandlers() && !hasDirectFileHandler) { + logger.addHandler(directFileHandler); + } + } + @SuppressWarnings({"UnnecessaryCallToStringValueOf", "StringOperationCanBeSimplified"}) private static final class FoxLoaderLogPrintStream extends PrintStream { private final Logger rootLogger; @@ -175,6 +199,12 @@ private static class DirectFileHandler extends StreamHandler { setOutputStream(Files.newOutputStream(file.toPath())); setLevel(Level.ALL); } + + @Override + public synchronized void publish(LogRecord record) { + super.publish(record); + flush(); + } } private static class SystemOutConsoleHandler extends ConsoleHandler { diff --git a/common/src/main/java/com/fox2code/foxloader/loader/PreLoader.java b/common/src/main/java/com/fox2code/foxloader/loader/PreLoader.java index 87abc5b..db4539e 100644 --- a/common/src/main/java/com/fox2code/foxloader/loader/PreLoader.java +++ b/common/src/main/java/com/fox2code/foxloader/loader/PreLoader.java @@ -128,7 +128,7 @@ static void initializePrePatch(boolean client) { prePatchInitialized = true; preLoadMetaJarHash.freeze(); final String currentHash = preLoadMetaJarHash.getHash(); - String previousHash = ""; + String previousHashAndSize = ""; File configFolder = ModLoader.foxLoader.configFolder; if (!configFolder.exists() && !configFolder.mkdirs()) { ModLoader.foxLoader.logger.severe("Can't create FoxLoader config folder!"); @@ -136,14 +136,17 @@ static void initializePrePatch(boolean client) { } File jar = new File(configFolder, client ? "PatchedMinecraftClient.jar" : "PatchedMinecraftServer.jar"); File hash = new File(configFolder, client ? "PatchedMinecraftClient.hash" : "PatchedMinecraftServer.hash"); + String jarSize = ""; if (jar.exists() && hash.exists()) { try { - previousHash = new String(Files.readAllBytes( + previousHashAndSize = new String(Files.readAllBytes( hash.toPath()), StandardCharsets.UTF_8); + jarSize = String.format("%08X", jar.length()); } catch (Exception ignored) {} } + String expectedHashAndSize = currentHash + jarSize; ModLoader.foxLoader.logger.info("PreLoader hash: " + currentHash); - if (currentHash.equals(previousHash) && !ignoreMinecraftCache) { + if (expectedHashAndSize.equals(previousHashAndSize) && !ignoreMinecraftCache) { ModLoader.foxLoader.logger.info("Existing patched jar exists, using that!"); try { FoxLauncher.getFoxClassLoader().setPatchedMinecraftURL(jar.toURI().toURL()); @@ -163,7 +166,8 @@ static void initializePrePatch(boolean client) { .getMinecraftSource().toURI().getPath()); ModLoader.foxLoader.logger.info("Source jar file: " + sourceJar.getAbsolutePath()); patchJar(sourceJar, jar, false); - Files.write(hash.toPath(), currentHash.getBytes(StandardCharsets.UTF_8)); + jarSize = String.format("%08X", jar.length()); + Files.write(hash.toPath(), (currentHash + jarSize).getBytes(StandardCharsets.UTF_8)); ModLoader.foxLoader.logger.info("Jar patched successfully, using that!"); FoxLauncher.getFoxClassLoader().setPatchedMinecraftURL(jar.toURI().toURL()); if (!ModLoader.DEV_MODE) ignoreMinecraft = true; @@ -193,6 +197,8 @@ static void loadPrePatches(boolean client) { registerPrePatch(new FrustrumHelperTransformer()); registerPrePatch(new NetworkMappingTransformer()); registerPrePatch(new ClientOnlyInventoryTransformer()); + } else { + registerPrePatch(new ConsoleLogManagerTransformer()); } } @@ -382,7 +388,7 @@ public String getHash() { byte[] hash = makeHash(); StringBuilder builder = new StringBuilder(); for (byte b : hash) { - builder.append(String.format("%02X ", b)); + builder.append(String.format("%02X", b)); } return builder.toString(); } diff --git a/common/src/main/java/com/fox2code/foxloader/loader/transformer/ConsoleLogManagerTransformer.java b/common/src/main/java/com/fox2code/foxloader/loader/transformer/ConsoleLogManagerTransformer.java new file mode 100644 index 0000000..fb4bea8 --- /dev/null +++ b/common/src/main/java/com/fox2code/foxloader/loader/transformer/ConsoleLogManagerTransformer.java @@ -0,0 +1,24 @@ +package com.fox2code.foxloader.loader.transformer; + +import org.objectweb.asm.tree.*; + +public class ConsoleLogManagerTransformer implements PreClassTransformer { + @Override + public void transform(ClassNode classNode, String className) { + if (!"net.minecraft.src.server.ConsoleLogManager".equals(className)) return; + MethodNode methodNode = TransformerUtils.findMethod(classNode, "init"); + if (methodNode == null) return; + for (AbstractInsnNode abstractInsnNode : methodNode.instructions) { + if (abstractInsnNode.getOpcode() == RETURN) { + InsnList insnList = new InsnList(); + insnList.add(new FieldInsnNode(GETSTATIC, + "net/minecraft/src/server/ConsoleLogManager", + "logger", "Ljava/util/logging/Logger;")); + insnList.add(new MethodInsnNode(INVOKESTATIC, + "com/fox2code/foxloader/launcher/FoxLauncher", + "installLoggerHelperOn", "(Ljava/util/logging/Logger;)V", false)); + methodNode.instructions.insertBefore(abstractInsnNode, insnList); + } + } + } +} diff --git a/common/src/main/java/com/fox2code/foxloader/registry/CommandCompat.java b/common/src/main/java/com/fox2code/foxloader/registry/CommandCompat.java index b1806db..9bf66ce 100644 --- a/common/src/main/java/com/fox2code/foxloader/registry/CommandCompat.java +++ b/common/src/main/java/com/fox2code/foxloader/registry/CommandCompat.java @@ -38,7 +38,8 @@ public CommandCompat(String name, boolean opOnly, boolean isHidden, String[] ali this.name = name; this.opOnly = opOnly; this.isHidden = isHidden; - this.aliases = aliases; + this.aliases = aliases == null ? + NO_ALIASES : aliases; } public String getName() { diff --git a/final/src/main/java/net/minecraft/client/main/Main.java b/final/src/main/java/net/minecraft/client/main/Main.java index ecd759d..d591b4d 100644 --- a/final/src/main/java/net/minecraft/client/main/Main.java +++ b/final/src/main/java/net/minecraft/client/main/Main.java @@ -2,6 +2,7 @@ import com.fox2code.foxloader.launcher.ClientMain; import net.minecraft.client.Minecraft; +import net.minecraft.client.MinecraftApplet; /** * Should never be loaded in memory, if it is loaded, it means something wrong happened @@ -10,6 +11,6 @@ */ public class Main { public static void main(String[] args) throws Exception { - Minecraft.main(args); + new MinecraftApplet(); // We need to remap args for it to work } } diff --git a/gradle.properties b/gradle.properties index d0952fd..9ddaf72 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx1024m -XX:-UseGCOverheadLimit -Dfile.encoding=UTF-8 # FoxLoader properties -foxloader.version=1.2.18 -foxloader.lastReIndevTransformerChanges=1.2.17 +foxloader.version=1.2.19 +foxloader.lastReIndevTransformerChanges=1.2.19 # ReIndev properties reindev.clientUrl=https://cdn.fox2code.com/files/reindev_2.8.1_04.jar diff --git a/server/build.gradle b/server/build.gradle index 214c119..5e457dd 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -10,4 +10,7 @@ dependencies { // Do no expose spark APIs to mods implementation(project['spark.dependency'] as String) + + // External mods APIs + implementation(project(":api")) } \ No newline at end of file diff --git a/server/src/main/java/com/fox2code/foxloader/loader/ServerModLoader.java b/server/src/main/java/com/fox2code/foxloader/loader/ServerModLoader.java index 26cbcb5..f4fadb0 100644 --- a/server/src/main/java/com/fox2code/foxloader/loader/ServerModLoader.java +++ b/server/src/main/java/com/fox2code/foxloader/loader/ServerModLoader.java @@ -5,6 +5,7 @@ import com.fox2code.foxloader.registry.CommandCompat; import com.fox2code.foxloader.registry.GameRegistryServer; import com.fox2code.foxloader.server.ServerCommandWrapper; +import com.fox2code.foxloader.server.ServerCommandWrapper4ReIndevPatches; import com.fox2code.foxloader.updater.UpdateManager; import net.minecraft.mitask.PlayerCommandHandler; import net.minecraft.server.MinecraftServer; @@ -39,8 +40,20 @@ public static void notifyRun() { GameRegistryServer.freezeRecipes(); // StatList.initBreakableStats(); // StatList.initStats(); - for (CommandCompat commandCompat : CommandCompat.commands.values()) { - PlayerCommandHandler.commands.add(new ServerCommandWrapper(commandCompat)); + boolean hasReIndevPatches; + try { + //noinspection ResultOfMethodCallIgnored + PlayerCommandHandler.commands.getClass(); + hasReIndevPatches = false; + } catch (Throwable t) { + hasReIndevPatches = true; + } + if (hasReIndevPatches) { + ServerCommandWrapper4ReIndevPatches.registerAllForReIndevPatches(); + } else { + for (CommandCompat commandCompat : CommandCompat.commands.values()) { + PlayerCommandHandler.commands.add(new ServerCommandWrapper(commandCompat)); + } } } } diff --git a/server/src/main/java/com/fox2code/foxloader/server/ServerCommandWrapper4ReIndevPatches.java b/server/src/main/java/com/fox2code/foxloader/server/ServerCommandWrapper4ReIndevPatches.java new file mode 100644 index 0000000..f2f4b04 --- /dev/null +++ b/server/src/main/java/com/fox2code/foxloader/server/ServerCommandWrapper4ReIndevPatches.java @@ -0,0 +1,87 @@ +package com.fox2code.foxloader.server; + +import com.fox2code.foxloader.loader.ModLoader; +import com.fox2code.foxloader.network.NetworkPlayer; +import com.fox2code.foxloader.registry.CommandCompat; +import net.minecraft.server.command.Command; +import net.minecraft.server.command.CommandSender; +import net.minecraft.server.command.IssuerRole; +import net.minecraft.server.plugin.JavaPlugin; + +import java.lang.reflect.Method; + +/** + * Compatibility class used in ReIndevPatches + */ +public class ServerCommandWrapper4ReIndevPatches extends Command { + private static final Method getPlayer; + static { + Method getPlayerTmp; + try { + //noinspection JavaReflectionMemberAccess + getPlayerTmp = CommandSender.class.getDeclaredMethod("getPlayer"); + } catch (NoSuchMethodException e) { + try { + //noinspection JavaReflectionMemberAccess + getPlayerTmp = CommandSender.class.getDeclaredMethod("getCommandSender"); + } catch (NoSuchMethodException e2) { + throw new RuntimeException("Not ReIndevPatches?", e); + } + } + getPlayer = getPlayerTmp; + } + + private final CommandCompat commandCompat; + + private ServerCommandWrapper4ReIndevPatches(CommandCompat commandCompat) { + super(commandCompat.getName(), commandCompat.getAliases()); + this.setIssuerRole(IssuerRole.PLAYER); // We don't support console :( + this.commandCompat = commandCompat; + } + + @Override + public void execute(String commandLabel, String[] args, CommandSender commandSender) { + NetworkPlayer networkPlayer = null; + if (commandSender.isPlayer()) { + try { + networkPlayer = (NetworkPlayer) getPlayer.invoke(commandSender); + } catch (Exception ignored) {} + } + if (networkPlayer == null) { + commandSender.sendMessage("FoxLoader defined commands can only be executed by players!"); + return; + } + final String[] foxArgs = new String[args.length + 1]; + foxArgs[0] = commandLabel; + System.arraycopy(args, 0, foxArgs, 1, args.length); + this.commandCompat.onExecute(foxArgs, networkPlayer); + } + + @Override + public boolean onlyForOperators() { + return this.commandCompat.isOpOnly(); + } + + @Override + public boolean hideCommandArgs() { + return this.commandCompat.isHidden(); + } + + private static final JavaPlugin foxLoaderJavaPlugin = new JavaPlugin() { + @SuppressWarnings("deprecation") + @Override + public String getName() { + return "FoxLoader"; + } + }; + + public static void registerAllForReIndevPatches() { + if (!ModLoader.areAllModsLoaded()) // Just a safeguard, just in case. + throw new IllegalArgumentException("Not Loaded?"); + for (CommandCompat commandCompat : CommandCompat.commands.values()) { + if (!foxLoaderJavaPlugin.registerCommand(new ServerCommandWrapper4ReIndevPatches(commandCompat), true)) { + ModLoader.getModLoaderLogger().warning("Failed to register /" + commandCompat.getName() + " command"); + } + } + } +} diff --git a/settings.gradle b/settings.gradle index 6fe0f30..3e61229 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,4 +6,5 @@ include 'final' include 'betacraft' include 'dev' include 'fallbacks' +include 'api'