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