Cooldown and F Spam System Implemented
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user