3 Commits

Author SHA1 Message Date
629eab8032 Update gradle
All checks were successful
build / build (21) (push) Successful in 5m4s
2025-01-27 10:55:17 +05:00
c809da4ec4 Update gradle
Some checks failed
build / build (21) (push) Failing after 4m41s
2025-01-27 10:29:20 +05:00
c16a344585 Add message command 2025-01-27 10:23:44 +05:00
3 changed files with 24 additions and 3 deletions

View File

@ -52,11 +52,19 @@ dependencies {
} }
processResources { processResources {
inputs.property "version", project.version // require dependencies to be the version compiled against or newer
Map<String, Object> properties = [
"version": version,
"minecraft_version": libs.versions.minecraft.get(),
"loader_version": libs.versions.fabric.loader.get(),
]
inputs.properties(properties)
filesMatching("fabric.mod.json") { filesMatching("fabric.mod.json") {
expand "version": project.version expand properties
} }
} }
tasks.withType(JavaCompile).configureEach { tasks.withType(JavaCompile).configureEach {
@ -64,6 +72,10 @@ tasks.withType(JavaCompile).configureEach {
it.options.release = 21 it.options.release = 21
} }
tasks.withType(Jar) {
exclude('META-INF/maven/**')
}
java { java {
sourceCompatibility = JavaVersion.VERSION_21 sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21

View File

@ -47,7 +47,7 @@ public class DonateThread extends Thread {
lastDonate = objects.getInt("id"); lastDonate = objects.getInt("id");
DonPayInteg.commands.addLast("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\""); DonPayInteg.commands.addLast(ConfigHandler.load().getMessageCmd().replace("{message}", msg.replace("{username}", objects.getJSONObject("vars").getString("name"))));
DonPayInteg.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name"))); DonPayInteg.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
LOGGER.info("Exec donate #{}", lastDonate); LOGGER.info("Exec donate #{}", lastDonate);

View File

@ -4,6 +4,7 @@ import java.util.List;
public class Config { public class Config {
private String donpayToken = "<YOUR_TOKEN>"; private String donpayToken = "<YOUR_TOKEN>";
private String messageCmd = "title @a title \"{message}\"";
private int reqCooldown = 15; private int reqCooldown = 15;
private int cmdCooldown = 2; private int cmdCooldown = 2;
private int lastDonate = 0; private int lastDonate = 0;
@ -49,5 +50,13 @@ public class Config {
public void setCmdCooldown(int cmdCooldown) { public void setCmdCooldown(int cmdCooldown) {
this.cmdCooldown = cmdCooldown; this.cmdCooldown = cmdCooldown;
} }
public String getMessageCmd() {
return messageCmd;
}
public void setMessageCmd(String messageCmd) {
this.messageCmd = messageCmd;
}
} }