mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixed Chimera Wing displaying warmup message if warmup was set to 0
This commit is contained in:
parent
0f77cf8066
commit
630c3e81e6
@ -22,6 +22,7 @@ Version 1.4.05-dev
|
|||||||
= Fixed huge mushroom blocks not being properly tracked
|
= Fixed huge mushroom blocks not being properly tracked
|
||||||
= Fixed potion buff option not using the appropriate # of ticks
|
= Fixed potion buff option not using the appropriate # of ticks
|
||||||
= Fixed Chimera Wing spamming console if Metrics was disabled
|
= Fixed Chimera Wing spamming console if Metrics was disabled
|
||||||
|
= Fixed Chimera Wing displaying warmup message if warmup was set to 0
|
||||||
|
|
||||||
Version 1.4.04
|
Version 1.4.04
|
||||||
+ Added functions to ExperienceAPI for use with offline players
|
+ Added functions to ExperienceAPI for use with offline players
|
||||||
|
@ -41,7 +41,7 @@ public class ChimaeraWingWarmup extends BukkitRunnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ItemUtils.isChimaeraWing(inHand) || inHand.getAmount() < Config.getInstance().getChimaeraUseCost()) {
|
if (!ItemUtils.isChimaeraWing(inHand) || inHand.getAmount() < Config.getInstance().getChimaeraUseCost()) {
|
||||||
player.sendMessage(ChatColor.DARK_RED + "Not holding enough " + ChatColor.GRAY + "ChimaeraWings"); //TODO Locale!
|
player.sendMessage(LocaleLoader.getString("Skills.NeedMore", "Chimaera Wings")); //TODO Locale!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public final class ChimaeraWing {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SkillUtils.cooldownOver(lastChimaeraWing * Misc.TIME_CONVERSION_FACTOR, Config.getInstance().getChimaeraCooldown(), player)) {
|
if (Config.getInstance().getChimaeraCooldown() > 0 && !SkillUtils.cooldownOver(lastChimaeraWing * Misc.TIME_CONVERSION_FACTOR, Config.getInstance().getChimaeraCooldown(), player)) {
|
||||||
player.sendMessage(ChatColor.RED + "You need to wait before you can use this again! " + ChatColor.YELLOW + "(" + SkillUtils.calculateTimeLeft(lastChimaeraWing * Misc.TIME_CONVERSION_FACTOR, Config.getInstance().getChimaeraCooldown(), player) + ")"); //TODO Locale!
|
player.sendMessage(ChatColor.RED + "You need to wait before you can use this again! " + ChatColor.YELLOW + "(" + SkillUtils.calculateTimeLeft(lastChimaeraWing * Misc.TIME_CONVERSION_FACTOR, Config.getInstance().getChimaeraCooldown(), player) + ")"); //TODO Locale!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,6 @@ public final class ChimaeraWing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Config.getInstance().getChimaeraPreventUseUnderground()) {
|
if (Config.getInstance().getChimaeraPreventUseUnderground()) {
|
||||||
|
|
||||||
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
|
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
|
||||||
player.setItemInHand(new ItemStack(getChimaeraWing(amount - Config.getInstance().getChimaeraUseCost())));
|
player.setItemInHand(new ItemStack(getChimaeraWing(amount - Config.getInstance().getChimaeraUseCost())));
|
||||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
||||||
@ -79,11 +78,18 @@ public final class ChimaeraWing {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mcMMOPlayer.actualizeChimaeraCommenceLocation(player);
|
mcMMOPlayer.actualizeChimaeraCommenceLocation(player);
|
||||||
|
|
||||||
long warmup = Config.getInstance().getChimaeraWarmup();
|
long warmup = Config.getInstance().getChimaeraWarmup();
|
||||||
player.sendMessage(ChatColor.GRAY + "Commencing teleport in " + ChatColor.GOLD + "(" + warmup + ")" + ChatColor.GRAY + " seconds, please stand still..."); //TODO Locale!
|
|
||||||
new ChimaeraWingWarmup(mcMMOPlayer).runTaskLater(mcMMO.p, 20 * warmup);
|
if (warmup > 0) {
|
||||||
|
player.sendMessage(ChatColor.GRAY + "Commencing teleport in " + ChatColor.GOLD + "(" + warmup + ")" + ChatColor.GRAY + " seconds, please stand still..."); //TODO Locale!
|
||||||
|
new ChimaeraWingWarmup(mcMMOPlayer).runTaskLater(mcMMO.p, 20 * warmup);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
chimaeraExecuteTeleport();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user