Cooldown and F Spam System Implemented
This commit is contained in:
@@ -24,6 +24,7 @@ public class CmdCreate extends FCommand {
|
||||
|
||||
this.permission = Permission.CREATE.node;
|
||||
this.disableOnLock = true;
|
||||
this.disableOnSpam = true;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
@@ -41,6 +42,11 @@ public class CmdCreate extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fme.isCooldownEnded("create")) {
|
||||
fme.msg(TL.COMMAND_ONCOOOLDOWN, fme.getCooldown("create"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Factions.getInstance().isTagTaken(tag)) {
|
||||
msg(TL.COMMAND_CREATE_INUSE);
|
||||
return;
|
||||
@@ -108,6 +114,9 @@ public class CmdCreate extends FCommand {
|
||||
if (SavageFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) {
|
||||
this.fme.msg(TL.COMMAND_PAYPALSET_CREATED);
|
||||
}
|
||||
|
||||
fme.setCooldown("create", System.currentTimeMillis() + (SavageFactions.plugin.getConfig().getInt("fcooldowns.f-create") * 1000));
|
||||
|
||||
if (Conf.useCustomDefaultPermissions) {
|
||||
faction.setDefaultPerms();
|
||||
if (Conf.usePermissionHints)
|
||||
|
||||
Reference in New Issue
Block a user