feat: config
This commit is contained in:
parent
2cb56bf357
commit
829235ce1b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -35,7 +35,7 @@ dependencies {
|
|||
modImplementation "io.wispforest:owo-lib:${project.owo_version}"
|
||||
|
||||
// placeholders
|
||||
modImplementation include("eu.pb4:placeholder-api:2.1.0+1.19.4")
|
||||
modImplementation include("eu.pb4:placeholder-api:${project.papi_version}")
|
||||
|
||||
// config yay
|
||||
annotationProcessor "io.wispforest:owo-lib:${project.owo_version}"
|
||||
|
|
|
@ -17,3 +17,4 @@ archives_base_name = yadmb
|
|||
fabric_version=0.84.0+1.19.4
|
||||
owo_version=0.10.4+1.19.4
|
||||
jda_version=5.0.0-beta.11
|
||||
papi_version=2.1.0+1.19.4
|
|
@ -13,5 +13,9 @@ public class YADMB implements ModInitializer {
|
|||
@Override
|
||||
public void onInitialize() {
|
||||
LOGGER.info("Oh wow, it started, anyways I'm just here to litter your logs.");
|
||||
|
||||
if(CONFIG.schemaVersion() != 1) {
|
||||
LOGGER.error("Unknown schema version! Please fix the config file at config/yadmb.json5. Server could crash while starting this mod!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,18 +13,13 @@ public class MainConfigModel {
|
|||
public String token = "";
|
||||
public long channel = 0;
|
||||
public long guild = 0;
|
||||
}
|
||||
|
||||
@Nest
|
||||
public Messages messages = new Messages();
|
||||
|
||||
public static class Messages {
|
||||
@Nest
|
||||
public MessagesDiscord discord = new MessagesDiscord();
|
||||
|
||||
public static class MessagesDiscord {
|
||||
@Nest
|
||||
public ChatMessage chatMessage = new ChatMessage();
|
||||
public ChatMessage chat = new ChatMessage();
|
||||
|
||||
public static class ChatMessage {
|
||||
public String content = "${message}";
|
||||
|
@ -34,17 +29,14 @@ public class MainConfigModel {
|
|||
|
||||
public static class Webhook {
|
||||
public Boolean enabled = true;
|
||||
public String username = "${username}";
|
||||
public String avatarUrl = "https://crafatar.com/avatars/${uuid}";
|
||||
public String username = "${player:username}";
|
||||
public String avatar = "https://crafatar.com/avatars/${player:uuid}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nest
|
||||
public MessagesMinecraft minecraft = new MessagesMinecraft();
|
||||
|
||||
public static class MessagesMinecraft {
|
||||
|
||||
}
|
||||
public static class Minecraft {
|
||||
public String format = "<<color:${discord:role_colour}>${discord:display_name}<reset>> ${discord:message}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package me.theclashfruit.yadmb.util;
|
||||
|
||||
public class DiscordMessageParser {
|
||||
public static String parse(String message) {
|
||||
// nah
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue