Compare commits

...

2 Commits

Author SHA1 Message Date
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 12 additions and 1 deletions

View File

@ -53,9 +53,11 @@ dependencies {
processResources {
inputs.property "version", project.version
inputs.property "loader_version", libs.versions.fabric.loader.get()
filesMatching("fabric.mod.json") {
expand "version": project.version
expand "loader_version": libs.versions.fabric.loader.get()
}
}

View File

@ -47,7 +47,7 @@ public class DonateThread extends Thread {
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")));
LOGGER.info("Exec donate #{}", lastDonate);

View File

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