mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Set a seperate cooldowns between getting hurt and teleportations
Closes #880
This commit is contained in:
@ -45,8 +45,10 @@ public class ChimaeraWingWarmup extends BukkitRunnable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SkillUtils.cooldownOver(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, 60, player)) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, 60, player)));
|
||||
int recentlyhurt_cooldown = Config.getInstance().getChimaeraRecentlyHurtCooldown();
|
||||
|
||||
if (!SkillUtils.cooldownOver(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, recentlyhurt_cooldown, player)) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, recentlyhurt_cooldown, player)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
@ -47,8 +48,10 @@ public class TeleportationWarmup extends BukkitRunnable {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SkillUtils.cooldownOver(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, 60, teleportingPlayer)) {
|
||||
teleportingPlayer.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, 60, teleportingPlayer)));
|
||||
int recentlyhurt_cooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
||||
|
||||
if (!SkillUtils.cooldownOver(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, recentlyhurt_cooldown, teleportingPlayer)) {
|
||||
teleportingPlayer.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, recentlyhurt_cooldown, teleportingPlayer)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user