Skip to content

Commit

Permalink
add Link Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
yor42 committed Nov 18, 2024
1 parent d3bf4f6 commit 5200d29
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/cn/academy/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.logging.log4j.LogManager;
Expand All @@ -43,7 +44,7 @@ public class Main {

public static final String VERSION = "@VERSION@";

public static final boolean DEBUG_MODE = VERSION.startsWith("@");
public static final boolean DEBUG_MODE = FMLLaunchHandler.isDeobfuscatedEnvironment();

public static final Logger log = LogManager.getLogger("AcademyCraft");

Expand Down
23 changes: 23 additions & 0 deletions src/main/java/cn/academy/support/groovyscript/LinkGenerator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cn.academy.support.groovyscript;

import cn.academy.Main;
import com.cleanroommc.groovyscript.documentation.linkgenerator.BasicLinkGenerator;
import com.cleanroommc.groovyscript.documentation.linkgenerator.ILinkGenerator;

public class LinkGenerator extends BasicLinkGenerator implements ILinkGenerator {

@Override
public String id() {
return "academy";
}

@Override
protected String version() {
return "v"+ Main.VERSION;
}

@Override
protected String domain() {
return "https://github.com/yor42/AcademyCraft";
}
}

0 comments on commit 5200d29

Please sign in to comment.