Add message command

This commit is contained in:
BitHeaven 2025-01-27 10:23:44 +05:00
parent 5baaba43d2
commit c16a344585
2 changed files with 10 additions and 1 deletions

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;
}
}