Finalized F Cooldowns

This commit is contained in:
Driftay
2020-04-06 16:50:12 -04:00
parent 919a3ada25
commit b15ff69682
2 changed files with 10 additions and 10 deletions

View File

@@ -54,6 +54,11 @@ public class CmdCreate extends FCommand {
return;
}
if(Cooldown.isOnCooldown(context.fPlayer.getPlayer(), "createCooldown") && !context.fPlayer.isAdminBypassing()){
context.msg(TL.COMMAND_COOLDOWN);
return;
}
ReserveObject factionReserve = FactionsPlugin.getInstance().getFactionReserves().stream().filter(factionReserve1 -> factionReserve1.getFactionName().equalsIgnoreCase(tag)).findFirst().orElse(null);
if (factionReserve != null && !factionReserve.getName().equalsIgnoreCase(context.player.getName())) {
context.msg(TL.COMMAND_CREATE_ALREADY_RESERVED);
@@ -71,11 +76,6 @@ public class CmdCreate extends FCommand {
return;
}
if(Cooldown.isOnCooldown(context.fPlayer.getPlayer(), "createCooldwn") && !context.fPlayer.isAdminBypassing()){
context.msg(TL.COMMAND_COOLDOWN);
return;
}
// trigger the faction creation event (cancellable)
FactionCreateEvent createEvent = new FactionCreateEvent(context.player, tag);
Bukkit.getServer().getPluginManager().callEvent(createEvent);