Change name variable
This commit is contained in:
parent
c73269a37b
commit
ffeef0b7ac
@ -22,7 +22,7 @@ public final class DonPayIntegPlug extends JavaPlugin {
|
||||
scheduler.runTaskTimer(this, () -> {
|
||||
thread.set(new DonateThread(this.getLogger()));
|
||||
thread.get().start();
|
||||
}, 1, 20 * ConfigHandler.load().getReqPerSec());
|
||||
}, 1, 20 * ConfigHandler.load().getReqCooldown());
|
||||
scheduler.runTaskTimer(this, () -> {
|
||||
if (!commands.isEmpty()) {
|
||||
this.getServer().dispatchCommand(Bukkit.getConsoleSender(), commands.getFirst());
|
||||
|
@ -4,7 +4,8 @@ import java.util.List;
|
||||
|
||||
public class Config {
|
||||
private String donpayToken = "<YOUR_TOKEN>";
|
||||
private int reqPerSec = 15;
|
||||
private int reqCooldown = 15;
|
||||
private int cmdCooldown = 2;
|
||||
private int lastDonate = 0;
|
||||
private List<Action> actions = List.of(new Action());
|
||||
|
||||
@ -33,11 +34,19 @@ public class Config {
|
||||
this.actions = actions;
|
||||
}
|
||||
|
||||
public int getReqPerSec() {
|
||||
return reqPerSec;
|
||||
public int getReqCooldown() {
|
||||
return reqCooldown;
|
||||
}
|
||||
|
||||
public void setReqPerSec(int reqPerSec) {
|
||||
this.reqPerSec = reqPerSec;
|
||||
public void setReqCooldown(int reqCooldown) {
|
||||
this.reqCooldown = reqCooldown;
|
||||
}
|
||||
|
||||
public int getCmdCooldown() {
|
||||
return cmdCooldown;
|
||||
}
|
||||
|
||||
public void setCmdCooldown(int cmdCooldown) {
|
||||
this.cmdCooldown = cmdCooldown;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user