Add message command in config
This commit is contained in:
parent
a73e43168c
commit
1a1038ceec
@ -52,7 +52,7 @@ public class DonateThread extends Thread {
|
|||||||
|
|
||||||
lastDonate = objects.getInt("id");
|
lastDonate = objects.getInt("id");
|
||||||
|
|
||||||
DonPayIntegPlug.commands.addLast("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
|
DonPayIntegPlug.commands.addLast(ConfigHandler.load().getMessageCmd().replace("{message}", msg.replace("{username}", objects.getJSONObject("vars").getString("name"))));
|
||||||
DonPayIntegPlug.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
|
DonPayIntegPlug.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
|
||||||
|
|
||||||
logger.info(String.format("Exec donate #%d", lastDonate));
|
logger.info(String.format("Exec donate #%d", lastDonate));
|
||||||
|
@ -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,4 +50,12 @@ 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user