Cooldown and F Spam System Implemented

This commit is contained in:
Driftay
2019-06-02 14:28:42 -04:00
parent 4833cafa0e
commit 420d8e3321
25 changed files with 150 additions and 395 deletions

View File

@@ -18,6 +18,7 @@ public abstract class FCommand extends MCommand<SavageFactions> {
public static final SimpleDateFormat sdf = new SimpleDateFormat(TL.DATE_FORMAT.toString());
public boolean disableOnLock;
public boolean disableOnSpam;
public FPlayer fme;
public Faction myFaction;
@@ -34,6 +35,7 @@ public abstract class FCommand extends MCommand<SavageFactions> {
// Due to safety reasons it defaults to disable on lock.
disableOnLock = true;
disableOnSpam = false;
// The money commands must be disabled if money should not be used.
isMoneyCommand = false;
@@ -69,6 +71,11 @@ public abstract class FCommand extends MCommand<SavageFactions> {
return false;
}
if(p.getSpam() && this.disableOnSpam){
msg("<b>Anti-Spam is currently enabled! Please try again later.");
return false;
}
if (this.isMoneyCommand && !Conf.econEnabled) {
msg("<b>Faction economy features are disabled on this server.");
return false;