mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 01:27:41 +01:00
ChimaeraWing now uses the action bar
This commit is contained in:
parent
14ca84fa97
commit
1cf1c6fab8
@ -51,6 +51,7 @@ Version 2.1.0
|
||||
= (MySQL) You can now inspect offline players
|
||||
= (MySQL) When converting from MySQL to flatfile mcMMO will now properly include all users in the conversion process
|
||||
+ (Party) Parties can now have size limits (configurable in config.yml), party size is unlimited by default
|
||||
! (Item) Improved some of the messages sent to the player regarding the Chimaera Wing
|
||||
! (Party) Party member list will only include members of the party that you can see (aren't vanished)
|
||||
! (Skills) Some skill level rank requirements have changed
|
||||
! (Skills) Fixed an edge case bug where Blast Mining wouldn't inform the player that it was on cooldown
|
||||
|
@ -699,7 +699,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* Interaction Settings */
|
||||
public boolean doesNotificationUseActionBar(NotificationType notificationType)
|
||||
{
|
||||
return config.getBoolean("Skills.FeedBack.ActionBarNotifications."+notificationType.toString(), true);
|
||||
return config.getBoolean("Feedback.ActionBarNotifications."+notificationType.toString(), true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5,18 +5,20 @@ package com.gmail.nossr50.datatypes.interactions;
|
||||
*/
|
||||
public enum NotificationType {
|
||||
XP_GAIN("ExperienceGain"),
|
||||
NO_PERMISSION("NoPermission"),
|
||||
SUBSKILL_UNLOCKED("SubSkillUnlocked"),
|
||||
LEVEL_UP_MESSAGE("LevelUps"),
|
||||
HOLIDAY("Holiday"),
|
||||
SUBSKILL_MESSAGE("SubSkillInteraction"),
|
||||
SUBSKILL_MESSAGE_FAILURE("SubSkillFailure"),
|
||||
TOOL("ToolReady"),
|
||||
UNSKILLED("LevelRequirementNotMet"),
|
||||
REQUIREMENTS_NOT_MET("RequirementsNotMet"),
|
||||
ABILITY_OFF("AbilityOff"),
|
||||
ABILITY_COOLDOWN("AbilityCoolDown"),
|
||||
ABILITY_REFRESHED("AbilityRefreshed"),
|
||||
SUPER_ABILITY("SuperAbilityInteraction"),
|
||||
SUPER_ABILITY_ALERT_OTHERS("SuperAbilityAlertOthers"),
|
||||
ITEM_MESSAGE("ItemMessage"),
|
||||
PARTY_MESSAGE("PartyMessage");
|
||||
|
||||
final String niceName;
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
|
||||
import com.gmail.nossr50.util.player.NotificationManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
@ -43,7 +45,7 @@ public final class ChimaeraWing {
|
||||
}
|
||||
|
||||
if (!Permissions.chimaeraWing(player)) {
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -56,7 +58,7 @@ public final class ChimaeraWing {
|
||||
int amount = inHand.getAmount();
|
||||
|
||||
if (amount < Config.getInstance().getChimaeraUseCost()) {
|
||||
player.sendMessage(LocaleLoader.getString("Skills.NeedMore", LocaleLoader.getString("Item.ChimaeraWing.Name")));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.NotEnough",String.valueOf(Config.getInstance().getChimaeraUseCost() - amount), "Item.ChimaeraWing.Name");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -67,7 +69,7 @@ public final class ChimaeraWing {
|
||||
int timeRemaining = SkillUtils.calculateTimeLeft(lastTeleport * Misc.TIME_CONVERSION_FACTOR, cooldown, player);
|
||||
|
||||
if (timeRemaining > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.Generic.Wait", timeRemaining));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Item.Generic.Wait", String.valueOf(timeRemaining));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -79,7 +81,7 @@ public final class ChimaeraWing {
|
||||
int timeRemaining = SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, hurtCooldown, player);
|
||||
|
||||
if (timeRemaining > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", timeRemaining));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.Injured.Wait", String.valueOf(timeRemaining));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -89,7 +91,7 @@ public final class ChimaeraWing {
|
||||
if (Config.getInstance().getChimaeraPreventUseUnderground()) {
|
||||
if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
|
||||
player.getInventory().setItemInMainHand(new ItemStack(getChimaeraWing(amount - Config.getInstance().getChimaeraUseCost())));
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Fail"));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.Fail");
|
||||
player.updateInventory();
|
||||
player.setVelocity(new Vector(0, 0.5D, 0));
|
||||
CombatUtils.dealDamage(player, Misc.getRandom().nextInt((int) (player.getHealth() - 10)));
|
||||
@ -103,7 +105,7 @@ public final class ChimaeraWing {
|
||||
long warmup = Config.getInstance().getChimaeraWarmup();
|
||||
|
||||
if (warmup > 0) {
|
||||
player.sendMessage(LocaleLoader.getString("Teleport.Commencing", warmup));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Teleport.Commencing", String.valueOf(warmup));
|
||||
new ChimaeraWingWarmup(mcMMOPlayer).runTaskLater(mcMMO.p, 20 * warmup);
|
||||
}
|
||||
else {
|
||||
@ -136,7 +138,7 @@ public final class ChimaeraWing {
|
||||
SoundManager.sendSound(player, location, SoundType.CHIMAERA_WING);
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.ChimaeraWing.Pass");
|
||||
}
|
||||
|
||||
public static ItemStack getChimaeraWing(int amount) {
|
||||
|
@ -13,23 +13,25 @@
|
||||
#
|
||||
# Settings for the Skills
|
||||
###
|
||||
Feedback:
|
||||
# Turning these to false will have them printed in chat instead
|
||||
ActionBarNotifications:
|
||||
AbilityOff: true
|
||||
RequirementsNotMet: true
|
||||
AbilityCoolDown: true
|
||||
LevelUps: true
|
||||
Holiday: true
|
||||
ToolReady: true
|
||||
SubSkillInteraction: true
|
||||
SubSkillFailure: true
|
||||
SubSkillUnlocked: true
|
||||
SuperAbilityInteraction: true
|
||||
SuperAbilityAlertOthers: true
|
||||
ExperienceGain: true
|
||||
ItemMessage: true
|
||||
NoPermission: true
|
||||
PartyMessage: true
|
||||
Skills:
|
||||
Feedback:
|
||||
# Turning these to false will have them printed in chat instead
|
||||
ActionBarNotifications:
|
||||
AbilityOff: true
|
||||
LevelRequirementNotMet: true
|
||||
AbilityCoolDown: true
|
||||
LevelUps: true
|
||||
Holiday: true
|
||||
ToolReady: true
|
||||
SubSkillInteraction: true
|
||||
SubSkillFailure: true
|
||||
SubSkillUnlocked: true
|
||||
SuperAbilityInteraction: true
|
||||
SuperAbilityAlertOthers: true
|
||||
ExperienceGain: true
|
||||
PartyMessage: true
|
||||
General:
|
||||
Ability:
|
||||
Length:
|
||||
|
@ -869,6 +869,7 @@ Item.ChimaeraWing.Fail=**CHIMAERA WING FAILED!**
|
||||
Item.ChimaeraWing.Pass=**CHIMAERA WING**
|
||||
Item.ChimaeraWing.Name=Chimaera Wing
|
||||
Item.ChimaeraWing.Lore=[[GRAY]]Teleports you to your bed.
|
||||
Item.ChimaeraWing.NotEnough=[[RED]]You need [[YELLOW]]{0}[[RED]] more [[GOLD]]{1}[[RED]]!
|
||||
Item.Generic.Wait=[[RED]]You need to wait before you can use this again! [[YELLOW]]({0}s)
|
||||
Item.Injured.Wait=You were injured recently and must wait to use this. [[YELLOW]]({0}s)
|
||||
Item.FluxPickaxe.Name=Flux Pickaxe
|
||||
|
Loading…
Reference in New Issue
Block a user