mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	NotificationManager now uses a getter in mcMMO
This commit is contained in:
		@@ -5,7 +5,6 @@ import com.gmail.nossr50.datatypes.party.Party;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.party.PartyLeader;
 | 
					import com.gmail.nossr50.datatypes.party.PartyLeader;
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.party.PartyManager;
 | 
					import com.gmail.nossr50.party.PartyManager;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import org.bukkit.OfflinePlayer;
 | 
					import org.bukkit.OfflinePlayer;
 | 
				
			||||||
import org.bukkit.entity.Player;
 | 
					import org.bukkit.entity.Player;
 | 
				
			||||||
@@ -92,7 +91,7 @@ public final class PartyAPI {
 | 
				
			|||||||
            party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName);
 | 
					            party = new Party(new PartyLeader(player.getUniqueId(), player.getName()), partyName);
 | 
				
			||||||
        } else if (mcMMO.getConfigManager().getConfigParty().getPartyGeneral().isPartySizeCapped()) {
 | 
					        } else if (mcMMO.getConfigManager().getConfigParty().getPartyGeneral().isPartySizeCapped()) {
 | 
				
			||||||
            if (PartyManager.isPartyFull(player, party)) {
 | 
					            if (PartyManager.isPartyFull(player, party)) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.PARTY_MESSAGE, "Commands.Party.PartyFull", party.toString());
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.PARTY_MESSAGE, "Commands.Party.PartyFull", party.toString());
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,6 @@ import com.gmail.nossr50.mcMMO;
 | 
				
			|||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.commands.CommandUtils;
 | 
					import com.gmail.nossr50.util.commands.CommandUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.google.common.collect.ImmutableList;
 | 
					import com.google.common.collect.ImmutableList;
 | 
				
			||||||
import org.bukkit.ChatColor;
 | 
					import org.bukkit.ChatColor;
 | 
				
			||||||
import org.bukkit.command.Command;
 | 
					import org.bukkit.command.Command;
 | 
				
			||||||
@@ -36,7 +35,7 @@ public class XprateCommand implements TabExecutor {
 | 
				
			|||||||
                if (mcMMO.p.isXPEventEnabled()) {
 | 
					                if (mcMMO.p.isXPEventEnabled()) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (mcMMO.getConfigManager().getConfigEvent().isSendTitleMessages()) {
 | 
					                    if (mcMMO.getConfigManager().getConfigEvent().isSendTitleMessages()) {
 | 
				
			||||||
                        NotificationManager.broadcastTitle(mcMMO.p.getServer(),
 | 
					                        mcMMO.getNotificationManager().broadcastTitle(mcMMO.p.getServer(),
 | 
				
			||||||
                                LocaleLoader.getString("Commands.Event.Stop"),
 | 
					                                LocaleLoader.getString("Commands.Event.Stop"),
 | 
				
			||||||
                                LocaleLoader.getString("Commands.Event.Stop.Subtitle"),
 | 
					                                LocaleLoader.getString("Commands.Event.Stop.Subtitle"),
 | 
				
			||||||
                                10, 10 * 20, 20);
 | 
					                                10, 10 * 20, 20);
 | 
				
			||||||
@@ -48,7 +47,7 @@ public class XprateCommand implements TabExecutor {
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    //Admin notification
 | 
					                    //Admin notification
 | 
				
			||||||
                    NotificationManager.processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_END);
 | 
					                    mcMMO.getNotificationManager().processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_END);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    mcMMO.p.toggleXpEventEnabled();
 | 
					                    mcMMO.p.toggleXpEventEnabled();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -84,7 +83,7 @@ public class XprateCommand implements TabExecutor {
 | 
				
			|||||||
                mcMMO.getDynamicSettingsManager().getExperienceManager().setGlobalXpMult(newXpRate);
 | 
					                mcMMO.getDynamicSettingsManager().getExperienceManager().setGlobalXpMult(newXpRate);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (mcMMO.getConfigManager().getConfigEvent().isSendTitleMessages()) {
 | 
					                if (mcMMO.getConfigManager().getConfigEvent().isSendTitleMessages()) {
 | 
				
			||||||
                    NotificationManager.broadcastTitle(mcMMO.p.getServer(),
 | 
					                    mcMMO.getNotificationManager().broadcastTitle(mcMMO.p.getServer(),
 | 
				
			||||||
                            LocaleLoader.getString("Commands.Event.Start"),
 | 
					                            LocaleLoader.getString("Commands.Event.Start"),
 | 
				
			||||||
                            LocaleLoader.getString("Commands.Event.XP", newXpRate),
 | 
					                            LocaleLoader.getString("Commands.Event.XP", newXpRate),
 | 
				
			||||||
                            10, 10 * 20, 20);
 | 
					                            10, 10 * 20, 20);
 | 
				
			||||||
@@ -96,7 +95,7 @@ public class XprateCommand implements TabExecutor {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                //Admin notification
 | 
					                //Admin notification
 | 
				
			||||||
                NotificationManager.processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_MODIFY, String.valueOf(newXpRate));
 | 
					                mcMMO.getNotificationManager().processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_MODIFY, String.valueOf(newXpRate));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,6 @@ import com.gmail.nossr50.util.Permissions;
 | 
				
			|||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.TextComponentFactory;
 | 
					import com.gmail.nossr50.util.TextComponentFactory;
 | 
				
			||||||
import com.gmail.nossr50.util.commands.CommandUtils;
 | 
					import com.gmail.nossr50.util.commands.CommandUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
					import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
				
			||||||
@@ -265,7 +264,7 @@ public abstract class SkillCommand implements TabExecutor {
 | 
				
			|||||||
        if (isCustom)
 | 
					        if (isCustom)
 | 
				
			||||||
            return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, vars));
 | 
					            return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, vars));
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            String[] mergedList = NotificationManager.addItemToFirstPositionOfArray(LocaleLoader.getString(statDescriptionKey), vars);
 | 
					            String[] mergedList = mcMMO.getNotificationManager().addItemToFirstPositionOfArray(LocaleLoader.getString(statDescriptionKey), vars);
 | 
				
			||||||
            return LocaleLoader.getString(templateKey, mergedList);
 | 
					            return LocaleLoader.getString(templateKey, mergedList);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,7 +40,6 @@ import com.gmail.nossr50.util.EventUtils;
 | 
				
			|||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.experience.ExperienceBarManager;
 | 
					import com.gmail.nossr50.util.experience.ExperienceBarManager;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
					import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
					import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
				
			||||||
@@ -600,7 +599,7 @@ public class McMMOPlayer {
 | 
				
			|||||||
         * Check to see if the player unlocked any new skills
 | 
					         * Check to see if the player unlocked any new skills
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerLevelUpNotification(this, primarySkillType, levelsGained, profile.getSkillLevel(primarySkillType));
 | 
					        mcMMO.getNotificationManager().sendPlayerLevelUpNotification(this, primarySkillType, levelsGained, profile.getSkillLevel(primarySkillType));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //UPDATE XP BARS
 | 
					        //UPDATE XP BARS
 | 
				
			||||||
        processPostXpEvent(xpGainReason, primarySkillType, mcMMO.p, xpGainSource);
 | 
					        processPostXpEvent(xpGainReason, primarySkillType, mcMMO.p, xpGainSource);
 | 
				
			||||||
@@ -822,7 +821,7 @@ public class McMMOPlayer {
 | 
				
			|||||||
            int diff = RankUtils.getSuperAbilityUnlockRequirement(skill.getAbility()) - getSkillLevel(skill);
 | 
					            int diff = RankUtils.getSuperAbilityUnlockRequirement(skill.getAbility()) - getSkillLevel(skill);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //Inform the player they are not yet skilled enough
 | 
					            //Inform the player they are not yet skilled enough
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.AbilityGateRequirementFail", String.valueOf(diff), skill.getName());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.AbilityGateRequirementFail", String.valueOf(diff), skill.getName());
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -834,7 +833,7 @@ public class McMMOPlayer {
 | 
				
			|||||||
             * We show them the too tired message when they take action.
 | 
					             * We show them the too tired message when they take action.
 | 
				
			||||||
             */
 | 
					             */
 | 
				
			||||||
            if (skill == PrimarySkillType.WOODCUTTING || skill == PrimarySkillType.AXES) {
 | 
					            if (skill == PrimarySkillType.WOODCUTTING || skill == PrimarySkillType.AXES) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
				
			||||||
                //SoundManager.sendSound(player, player.getLocation(), SoundType.TIRED);
 | 
					                //SoundManager.sendSound(player, player.getLocation(), SoundType.TIRED);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -862,7 +861,7 @@ public class McMMOPlayer {
 | 
				
			|||||||
        ParticleEffectUtils.playAbilityEnabledEffect(player);
 | 
					        ParticleEffectUtils.playAbilityEnabledEffect(player);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (useChatNotifications()) {
 | 
					        if (useChatNotifications()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUPER_ABILITY, ability.getAbilityOn());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUPER_ABILITY, ability.getAbilityOn());
 | 
				
			||||||
            //player.sendMessage(ability.getAbilityOn());
 | 
					            //player.sendMessage(ability.getAbilityOn());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -917,13 +916,13 @@ public class McMMOPlayer {
 | 
				
			|||||||
                int timeRemaining = calculateTimeRemaining(ability);
 | 
					                int timeRemaining = calculateTimeRemaining(ability);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (!getAbilityMode(ability) && timeRemaining > 0) {
 | 
					                if (!getAbilityMode(ability) && timeRemaining > 0) {
 | 
				
			||||||
                    NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
					                    mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
				
			||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (mcMMO.getConfigManager().getConfigNotifications().isSuperAbilityToolMessage()) {
 | 
					            if (mcMMO.getConfigManager().getConfigNotifications().isSuperAbilityToolMessage()) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.TOOL, tool.getRaiseTool());
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.TOOL, tool.getRaiseTool());
 | 
				
			||||||
                SoundManager.sendSound(player, player.getLocation(), SoundType.TOOL_READY);
 | 
					                SoundManager.sendSound(player, player.getLocation(), SoundType.TOOL_READY);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,6 @@ import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			|||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.EventUtils;
 | 
					import com.gmail.nossr50.util.EventUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkill;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkill;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
@@ -207,7 +206,7 @@ public class Roll extends AcrobaticsSubSkill {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (!isFatal(player, modifiedDamage)
 | 
					        if (!isFatal(player, modifiedDamage)
 | 
				
			||||||
                && RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.ACROBATICS_ROLL, player)) {
 | 
					                && RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.ACROBATICS_ROLL, player)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Roll.Text");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Roll.Text");
 | 
				
			||||||
            SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS);
 | 
					            SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!mcMMO.getConfigManager().getConfigExploitPrevention().getConfigSectionExploitAcrobatics().isPreventAcrobaticsAbuse())
 | 
					            if (!mcMMO.getConfigManager().getConfigExploitPrevention().getConfigSectionExploitAcrobatics().isPreventAcrobaticsAbuse())
 | 
				
			||||||
@@ -246,7 +245,7 @@ public class Roll extends AcrobaticsSubSkill {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (!isFatal(player, modifiedDamage)
 | 
					        if (!isFatal(player, modifiedDamage)
 | 
				
			||||||
                && RandomChanceUtil.checkRandomChanceExecutionSuccess(rcs)) {
 | 
					                && RandomChanceUtil.checkRandomChanceExecutionSuccess(rcs)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Ability.Proc");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Ability.Proc");
 | 
				
			||||||
            SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS, 0.5F);
 | 
					            SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS, 0.5F);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!mcMMO.getConfigManager().getConfigExploitPrevention().getConfigSectionExploitAcrobatics().isPreventAcrobaticsAbuse())
 | 
					            if (!mcMMO.getConfigManager().getConfigExploitPrevention().getConfigSectionExploitAcrobatics().isPreventAcrobaticsAbuse())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -369,7 +369,7 @@
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
//        int levelTotal = Misc.getRandom().nextInt(1 + UserManager.getPlayer(player).getSkillLevel(PrimarySkillType.MINING)) + 1;
 | 
					//        int levelTotal = Misc.getRandom().nextInt(1 + UserManager.getPlayer(player).getSkillLevel(PrimarySkillType.MINING)) + 1;
 | 
				
			||||||
//        SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
 | 
					//        SoundManager.sendSound(player, player.getLocation(), SoundType.LEVEL_UP);
 | 
				
			||||||
//        NotificationManager.sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal));
 | 
					//        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.HOLIDAY, "Holiday.AprilFools.Levelup", StringUtils.getCapitalized(fakeSkillType.toString()), String.valueOf(levelTotal));
 | 
				
			||||||
////        ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size())));
 | 
					////        ParticleEffectUtils.fireworkParticleShower(player, ALL_COLORS.get(Misc.getRandom().nextInt(ALL_COLORS.size())));
 | 
				
			||||||
//    }
 | 
					//    }
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,6 +31,7 @@ import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager;
 | 
				
			|||||||
import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
 | 
					import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory;
 | 
				
			||||||
import com.gmail.nossr50.util.commands.CommandRegistrationManager;
 | 
					import com.gmail.nossr50.util.commands.CommandRegistrationManager;
 | 
				
			||||||
import com.gmail.nossr50.util.experience.FormulaManager;
 | 
					import com.gmail.nossr50.util.experience.FormulaManager;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.util.player.NotificationManager;
 | 
				
			||||||
import com.gmail.nossr50.util.player.PlayerLevelUtils;
 | 
					import com.gmail.nossr50.util.player.PlayerLevelUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
					import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
 | 
				
			||||||
@@ -60,6 +61,7 @@ public class mcMMO extends JavaPlugin {
 | 
				
			|||||||
    private static FormulaManager formulaManager;
 | 
					    private static FormulaManager formulaManager;
 | 
				
			||||||
    private static MaterialMapStore materialMapStore;
 | 
					    private static MaterialMapStore materialMapStore;
 | 
				
			||||||
    private static PlayerLevelUtils playerLevelUtils;
 | 
					    private static PlayerLevelUtils playerLevelUtils;
 | 
				
			||||||
 | 
					    private static NotificationManager notificationManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* File Paths */
 | 
					    /* File Paths */
 | 
				
			||||||
    private static String mainDirectory;
 | 
					    private static String mainDirectory;
 | 
				
			||||||
@@ -181,6 +183,9 @@ public class mcMMO extends JavaPlugin {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Init player level values
 | 
					        //Init player level values
 | 
				
			||||||
        playerLevelUtils = new PlayerLevelUtils();
 | 
					        playerLevelUtils = new PlayerLevelUtils();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //Init Notification Manager
 | 
				
			||||||
 | 
					        notificationManager = new NotificationManager();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
@@ -576,4 +581,8 @@ public class mcMMO extends JavaPlugin {
 | 
				
			|||||||
        SPIGOT,
 | 
					        SPIGOT,
 | 
				
			||||||
        CRAFTBUKKIT
 | 
					        CRAFTBUKKIT
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static NotificationManager getNotificationManager() {
 | 
				
			||||||
 | 
					        return notificationManager;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -12,7 +12,6 @@ import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			|||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.sounds.SoundManager;
 | 
					import com.gmail.nossr50.util.sounds.SoundManager;
 | 
				
			||||||
import com.gmail.nossr50.util.sounds.SoundType;
 | 
					import com.gmail.nossr50.util.sounds.SoundType;
 | 
				
			||||||
@@ -456,7 +455,7 @@ public final class PartyManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Check if the party still exists, it might have been disbanded
 | 
					        // Check if the party still exists, it might have been disbanded
 | 
				
			||||||
        if (!parties.contains(invite)) {
 | 
					        if (!parties.contains(invite)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.PARTY_MESSAGE, "Party.Disband");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.PARTY_MESSAGE, "Party.Disband");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -464,13 +463,13 @@ public final class PartyManager {
 | 
				
			|||||||
         * Don't let players join a full party
 | 
					         * Don't let players join a full party
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigParty().isPartySizeCapped() && invite.getMembers().size() >= mcMMO.getConfigManager().getConfigParty().getPartySizeLimit()) {
 | 
					        if (mcMMO.getConfigManager().getConfigParty().isPartySizeCapped() && invite.getMembers().size() >= mcMMO.getConfigManager().getConfigParty().getPartySizeLimit()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(),
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(mcMMOPlayer.getPlayer(),
 | 
				
			||||||
                    NotificationType.PARTY_MESSAGE, "Commands.Party.PartyFull.InviteAccept",
 | 
					                    NotificationType.PARTY_MESSAGE, "Commands.Party.PartyFull.InviteAccept",
 | 
				
			||||||
                    invite.getName(), String.valueOf(mcMMO.getConfigManager().getConfigParty().getPartySizeLimit()));
 | 
					                    invite.getName(), String.valueOf(mcMMO.getConfigManager().getConfigParty().getPartySizeLimit()));
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.PARTY_MESSAGE, "Commands.Party.Invite.Accepted", invite.getName());
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.PARTY_MESSAGE, "Commands.Party.Invite.Accepted", invite.getName());
 | 
				
			||||||
        mcMMOPlayer.removePartyInvite();
 | 
					        mcMMOPlayer.removePartyInvite();
 | 
				
			||||||
        addToParty(mcMMOPlayer, invite);
 | 
					        addToParty(mcMMOPlayer, invite);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
package com.gmail.nossr50.runnables.player;
 | 
					package com.gmail.nossr50.runnables.player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.gmail.nossr50.config.MainConfig;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
					import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
 | 
					import com.gmail.nossr50.datatypes.player.PlayerProfile;
 | 
				
			||||||
import com.gmail.nossr50.locale.LocaleLoader;
 | 
					import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ package com.gmail.nossr50.runnables.skills;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
					import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
					import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
					import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import org.bukkit.scheduler.BukkitRunnable;
 | 
					import org.bukkit.scheduler.BukkitRunnable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class AbilityCooldownTask extends BukkitRunnable {
 | 
					public class AbilityCooldownTask extends BukkitRunnable {
 | 
				
			||||||
@@ -23,7 +23,7 @@ public class AbilityCooldownTask extends BukkitRunnable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        mcMMOPlayer.setAbilityInformed(ability, true);
 | 
					        mcMMOPlayer.setAbilityInformed(ability, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
 | 
				
			||||||
        //mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
 | 
					        //mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,6 @@ import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
				
			|||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.EventUtils;
 | 
					import com.gmail.nossr50.util.EventUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
					import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.PerksUtils;
 | 
					import com.gmail.nossr50.util.skills.PerksUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.SkillUtils;
 | 
					import com.gmail.nossr50.util.skills.SkillUtils;
 | 
				
			||||||
@@ -58,7 +57,7 @@ public class AbilityDisableTask extends BukkitRunnable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (mcMMOPlayer.useChatNotifications()) {
 | 
					        if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
            //player.sendMessage(ability.getAbilityOff());
 | 
					            //player.sendMessage(ability.getAbilityOff());
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
					import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.MobHealthbarUtils;
 | 
					import com.gmail.nossr50.util.MobHealthbarUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.skills.CombatUtils;
 | 
					import com.gmail.nossr50.util.skills.CombatUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
					import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.sounds.SoundManager;
 | 
					import com.gmail.nossr50.util.sounds.SoundManager;
 | 
				
			||||||
@@ -82,7 +81,7 @@ public class BleedTimerTask extends BukkitRunnable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            if (containerEntry.getValue().bleedTicks <= 0 || !target.isValid()) {
 | 
					            if (containerEntry.getValue().bleedTicks <= 0 || !target.isValid()) {
 | 
				
			||||||
                if (target instanceof Player) {
 | 
					                if (target instanceof Player) {
 | 
				
			||||||
                    NotificationManager.sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Stopped");
 | 
					                    mcMMO.getNotificationManager().sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Stopped");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                bleedIterator.remove();
 | 
					                bleedIterator.remove();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@ package com.gmail.nossr50.runnables.skills;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
					import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import org.bukkit.scheduler.BukkitRunnable;
 | 
					import org.bukkit.scheduler.BukkitRunnable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -38,6 +38,6 @@ public class SkillUnlockNotificationTask extends BukkitRunnable {
 | 
				
			|||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void run() {
 | 
					    public void run() {
 | 
				
			||||||
        //mcMMOPlayer.getPlayer().sendTitle(subSkillType.getLocaleName(), "Rank "+rank, 7, 20, 7);
 | 
					        //mcMMOPlayer.getPlayer().sendTitle(subSkillType.getLocaleName(), "Rank "+rank, 7, 20, 7);
 | 
				
			||||||
        NotificationManager.sendPlayerUnlockNotification(mcMMOPlayer, subSkillType);
 | 
					        mcMMO.getNotificationManager().sendPlayerUnlockNotification(mcMMOPlayer, subSkillType);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,6 @@ import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
					import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
					import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import org.bukkit.scheduler.BukkitRunnable;
 | 
					import org.bukkit.scheduler.BukkitRunnable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class ToolLowerTask extends BukkitRunnable {
 | 
					public class ToolLowerTask extends BukkitRunnable {
 | 
				
			||||||
@@ -25,7 +24,7 @@ public class ToolLowerTask extends BukkitRunnable {
 | 
				
			|||||||
        mcMMOPlayer.setToolPreparationMode(tool, false);
 | 
					        mcMMOPlayer.setToolPreparationMode(tool, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigNotifications().isSuperAbilityToolMessage()) {
 | 
					        if (mcMMO.getConfigManager().getConfigNotifications().isSuperAbilityToolMessage()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.TOOL, tool.getLowerTool());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.TOOL, tool.getLowerTool());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,6 @@ import com.gmail.nossr50.mcMMO;
 | 
				
			|||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
					import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -88,7 +87,7 @@ public class AcrobaticsManager extends SkillManager {
 | 
				
			|||||||
            ParticleEffectUtils.playDodgeEffect(player);
 | 
					            ParticleEffectUtils.playDodgeEffect(player);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (mcMMOPlayer.useChatNotifications()) {
 | 
					            if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Combat.Proc");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Combat.Proc");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //Check respawn to prevent abuse
 | 
					            //Check respawn to prevent abuse
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,10 +5,10 @@ import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
					import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.SkillActivationType;
 | 
					import com.gmail.nossr50.util.skills.SkillActivationType;
 | 
				
			||||||
@@ -90,12 +90,12 @@ public class ArcheryManager extends SkillManager {
 | 
				
			|||||||
        defender.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 20 * 10, 10));
 | 
					        defender.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 20 * 10, 10));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (NotificationManager.doesPlayerUseNotifications(defender)) {
 | 
					        if (mcMMO.getNotificationManager().doesPlayerUseNotifications(defender)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Combat.TouchedFuzzy");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Combat.TouchedFuzzy");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMOPlayer.useChatNotifications()) {
 | 
					        if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.TargetDazed");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.TargetDazed");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return Archery.getDazeBonusDamage();
 | 
					        return Archery.getDazeBonusDamage();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,6 @@ import com.gmail.nossr50.mcMMO;
 | 
				
			|||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.ItemUtils;
 | 
					import com.gmail.nossr50.util.ItemUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.*;
 | 
					import com.gmail.nossr50.util.skills.*;
 | 
				
			||||||
import org.bukkit.entity.LivingEntity;
 | 
					import org.bukkit.entity.LivingEntity;
 | 
				
			||||||
@@ -89,14 +88,14 @@ public class AxesManager extends SkillManager {
 | 
				
			|||||||
        Player player = getPlayer();
 | 
					        Player player = getPlayer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMOPlayer.useChatNotifications()) {
 | 
					        if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CriticalHit");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CriticalHit");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (target instanceof Player) {
 | 
					        if (target instanceof Player) {
 | 
				
			||||||
            Player defender = (Player) target;
 | 
					            Player defender = (Player) target;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (NotificationManager.doesPlayerUseNotifications(defender)) {
 | 
					            if (mcMMO.getNotificationManager().doesPlayerUseNotifications(defender)) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CritStruck");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CritStruck");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            damage = (damage * mcMMO.getConfigManager().getConfigAxes().getConfigAxesCriticalStrikes().getDamageProperty().getPVPModifier()) - damage;
 | 
					            damage = (damage * mcMMO.getConfigManager().getConfigAxes().getConfigAxesCriticalStrikes().getDamageProperty().getPVPModifier()) - damage;
 | 
				
			||||||
@@ -145,14 +144,14 @@ public class AxesManager extends SkillManager {
 | 
				
			|||||||
        target.setVelocity(player.getLocation().getDirection().normalize().multiply(mcMMO.getConfigManager().getConfigAxes().getGreaterImpactKnockBackModifier()));
 | 
					        target.setVelocity(player.getLocation().getDirection().normalize().multiply(mcMMO.getConfigManager().getConfigAxes().getGreaterImpactKnockBackModifier()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMOPlayer.useChatNotifications()) {
 | 
					        if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Proc");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Proc");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (target instanceof Player) {
 | 
					        if (target instanceof Player) {
 | 
				
			||||||
            Player defender = (Player) target;
 | 
					            Player defender = (Player) target;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (NotificationManager.doesPlayerUseNotifications(defender)) {
 | 
					            if (mcMMO.getNotificationManager().doesPlayerUseNotifications(defender)) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Struck");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Struck");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,6 @@ import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			|||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.*;
 | 
					import com.gmail.nossr50.util.*;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.CombatUtils;
 | 
					import com.gmail.nossr50.util.skills.CombatUtils;
 | 
				
			||||||
@@ -312,7 +311,7 @@ public class FishingManager extends SkillManager {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (enchanted) {
 | 
					                if (enchanted) {
 | 
				
			||||||
                    NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Fishing.Ability.TH.MagicFound");
 | 
					                    mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Fishing.Ability.TH.MagicFound");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (mcMMO.getConfigManager().getConfigFishing().isAlwaysCatchFish()) {
 | 
					                if (mcMMO.getConfigManager().getConfigFishing().isAlwaysCatchFish()) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,6 @@ import com.gmail.nossr50.mcMMO;
 | 
				
			|||||||
import com.gmail.nossr50.runnables.skills.HerbalismBlockUpdaterTask;
 | 
					import com.gmail.nossr50.runnables.skills.HerbalismBlockUpdaterTask;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.*;
 | 
					import com.gmail.nossr50.util.*;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -108,7 +107,7 @@ public class HerbalismManager extends SkillManager {
 | 
				
			|||||||
        ItemStack seed = new ItemStack(Material.WHEAT_SEEDS);
 | 
					        ItemStack seed = new ItemStack(Material.WHEAT_SEEDS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!playerInventory.containsAtLeast(seed, 1)) {
 | 
					        if (!playerInventory.containsAtLeast(seed, 1)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Herbalism.Ability.GTe.NeedMore");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Herbalism.Ability.GTe.NeedMore");
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -195,7 +194,7 @@ public class HerbalismManager extends SkillManager {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean processGreenThumbBlocks(BlockState blockState) {
 | 
					    public boolean processGreenThumbBlocks(BlockState blockState) {
 | 
				
			||||||
        if (!RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.HERBALISM_GREEN_THUMB, getPlayer())) {
 | 
					        if (!RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.HERBALISM_GREEN_THUMB, getPlayer())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Herbalism.Ability.GTh.Fail");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Herbalism.Ability.GTh.Fail");
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -234,7 +233,7 @@ public class HerbalismManager extends SkillManager {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                blockState.setType(Material.AIR);
 | 
					                blockState.setType(Material.AIR);
 | 
				
			||||||
                Misc.dropItem(location, treasure.getDrop());
 | 
					                Misc.dropItem(location, treasure.getDrop());
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Herbalism.HylianLuck");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Herbalism.HylianLuck");
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -252,12 +251,12 @@ public class HerbalismManager extends SkillManager {
 | 
				
			|||||||
        PlayerInventory playerInventory = player.getInventory();
 | 
					        PlayerInventory playerInventory = player.getInventory();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!playerInventory.contains(Material.BROWN_MUSHROOM, 1)) {
 | 
					        if (!playerInventory.contains(Material.BROWN_MUSHROOM, 1)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Skills.NeedMore", StringUtils.getPrettyItemString(Material.BROWN_MUSHROOM));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Skills.NeedMore", StringUtils.getPrettyItemString(Material.BROWN_MUSHROOM));
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!playerInventory.contains(Material.RED_MUSHROOM, 1)) {
 | 
					        if (!playerInventory.contains(Material.RED_MUSHROOM, 1)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Skills.NeedMore", StringUtils.getPrettyItemString(Material.RED_MUSHROOM));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Skills.NeedMore", StringUtils.getPrettyItemString(Material.RED_MUSHROOM));
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -266,7 +265,7 @@ public class HerbalismManager extends SkillManager {
 | 
				
			|||||||
        player.updateInventory();
 | 
					        player.updateInventory();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.HERBALISM_SHROOM_THUMB, player)) {
 | 
					        if (!RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.HERBALISM_SHROOM_THUMB, player)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Herbalism.Ability.ShroomThumb.Fail");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Herbalism.Ability.ShroomThumb.Fail");
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,6 @@ import com.gmail.nossr50.util.BlockUtils;
 | 
				
			|||||||
import com.gmail.nossr50.util.EventUtils;
 | 
					import com.gmail.nossr50.util.EventUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.SkillUtils;
 | 
					import com.gmail.nossr50.util.skills.SkillUtils;
 | 
				
			||||||
@@ -123,7 +122,7 @@ public class MiningManager extends SkillManager {
 | 
				
			|||||||
        TNTPrimed tnt = player.getWorld().spawn(targetBlock.getLocation(), TNTPrimed.class);
 | 
					        TNTPrimed tnt = player.getWorld().spawn(targetBlock.getLocation(), TNTPrimed.class);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //SkillUtils.sendSkillMessage(player, SuperAbilityType.BLAST_MINING.getAbilityPlayer(player));
 | 
					        //SkillUtils.sendSkillMessage(player, SuperAbilityType.BLAST_MINING.getAbilityPlayer(player));
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.SUPER_ABILITY, "Mining.Blast.Boom");
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUPER_ABILITY, "Mining.Blast.Boom");
 | 
				
			||||||
        //player.sendMessage(LocaleLoader.getString("Mining.Blast.Boom"));
 | 
					        //player.sendMessage(LocaleLoader.getString("Mining.Blast.Boom"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        tnt.setMetadata(MetadataConstants.TNT_TRACKING_METAKEY, mcMMOPlayer.getPlayerMetadata());
 | 
					        tnt.setMetadata(MetadataConstants.TNT_TRACKING_METAKEY, mcMMOPlayer.getPlayerMetadata());
 | 
				
			||||||
@@ -262,7 +261,7 @@ public class MiningManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (timeRemaining > 0) {
 | 
					        if (timeRemaining > 0) {
 | 
				
			||||||
            //getPlayer().sendMessage(LocaleLoader.getString("Skills.TooTired", timeRemaining));
 | 
					            //getPlayer().sendMessage(LocaleLoader.getString("Skills.TooTired", timeRemaining));
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,6 @@ import com.gmail.nossr50.util.EventUtils;
 | 
				
			|||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -50,7 +49,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigRepair().getRepairGeneral().isAnvilMessages()) {
 | 
					        if (mcMMO.getConfigManager().getConfigRepair().getRepairGeneral().isAnvilMessages()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Repair.Listener.Anvil");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Repair.Listener.Anvil");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigRepair().getRepairGeneral().isAnvilPlacedSounds()) {
 | 
					        if (mcMMO.getConfigManager().getConfigRepair().getRepairGeneral().isAnvilPlacedSounds()) {
 | 
				
			||||||
@@ -66,18 +65,18 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
        Repairable repairable = mcMMO.getRepairableManager().getRepairable(item.getType());
 | 
					        Repairable repairable = mcMMO.getRepairableManager().getRepairable(item.getType());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (item.getItemMeta().isUnbreakable()) {
 | 
					        if (item.getItemMeta().isUnbreakable()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Anvil.Unbreakable");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Anvil.Unbreakable");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Permissions checks on material and item types
 | 
					        // Permissions checks on material and item types
 | 
				
			||||||
        if (!Permissions.repairMaterialType(player, repairable.getRepairItemMaterialCategory())) {
 | 
					        if (!Permissions.repairMaterialType(player, repairable.getRepairItemMaterialCategory())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!Permissions.repairItemType(player, repairable.getRepairItemType())) {
 | 
					        if (!Permissions.repairItemType(player, repairable.getRepairItemType())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -86,7 +85,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Level check
 | 
					        // Level check
 | 
				
			||||||
        if (skillLevel < minimumRepairableLevel) {
 | 
					        if (skillLevel < minimumRepairableLevel) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Skills.Adept", String.valueOf(minimumRepairableLevel), StringUtils.getPrettyItemString(item.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Skills.Adept", String.valueOf(minimumRepairableLevel), StringUtils.getPrettyItemString(item.getType()));
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -121,7 +120,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Do not repair if at full durability
 | 
					        // Do not repair if at full durability
 | 
				
			||||||
        if (startDurability <= 0) {
 | 
					        if (startDurability <= 0) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Skills.FullDurability");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Skills.FullDurability");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -184,7 +183,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        actualizeLastAnvilUse();
 | 
					        actualizeLastAnvilUse();
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Skills.ConfirmOrCancel", LocaleLoader.getString("Repair.Pretty.Name"));
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Skills.ConfirmOrCancel", LocaleLoader.getString("Repair.Pretty.Name"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -291,7 +290,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.REPAIR_SUPER_REPAIR, getPlayer())) {
 | 
					        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.REPAIR_SUPER_REPAIR, getPlayer())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Skills.FeltEasy");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Skills.FeltEasy");
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -313,7 +312,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (Permissions.arcaneBypass(player)) {
 | 
					        if (Permissions.arcaneBypass(player)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Arcane.Perfect");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Arcane.Perfect");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -322,7 +321,7 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
                item.removeEnchantment(enchant);
 | 
					                item.removeEnchantment(enchant);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Lost");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Lost");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -347,11 +346,11 @@ public class RepairManager extends SkillManager {
 | 
				
			|||||||
        Map<Enchantment, Integer> newEnchants = item.getEnchantments();
 | 
					        Map<Enchantment, Integer> newEnchants = item.getEnchantments();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (newEnchants.isEmpty()) {
 | 
					        if (newEnchants.isEmpty()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Fail");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Fail");
 | 
				
			||||||
        } else if (downgraded || newEnchants.size() < enchants.size()) {
 | 
					        } else if (downgraded || newEnchants.size() < enchants.size()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Downgrade");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE_FAILED, "Repair.Arcane.Downgrade");
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Arcane.Perfect");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Arcane.Perfect");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,6 @@ import com.gmail.nossr50.util.EventUtils;
 | 
				
			|||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -49,7 +48,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigSalvage().getGeneral().isAnvilMessages()) {
 | 
					        if (mcMMO.getConfigManager().getConfigSalvage().getGeneral().isAnvilMessages()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Salvage.Listener.Anvil");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Salvage.Listener.Anvil");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (mcMMO.getConfigManager().getConfigSalvage().getGeneral().isAnvilPlacedSounds()) {
 | 
					        if (mcMMO.getConfigManager().getConfigSalvage().getGeneral().isAnvilPlacedSounds()) {
 | 
				
			||||||
@@ -65,18 +64,18 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        Salvageable salvageable = mcMMO.getSalvageableManager().getSalvageable(item.getType());
 | 
					        Salvageable salvageable = mcMMO.getSalvageableManager().getSalvageable(item.getType());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (item.getItemMeta().isUnbreakable()) {
 | 
					        if (item.getItemMeta().isUnbreakable()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Anvil.Unbreakable");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Anvil.Unbreakable");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Permissions checks on material and item types
 | 
					        // Permissions checks on material and item types
 | 
				
			||||||
        if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) {
 | 
					        if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!Permissions.salvageMaterialType(player, salvageable.getSalvageItemMaterialCategory())) {
 | 
					        if (!Permissions.salvageMaterialType(player, salvageable.getSalvageItemMaterialCategory())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -85,7 +84,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Level check
 | 
					        // Level check
 | 
				
			||||||
        if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
 | 
					        if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Salvage.Skills.Adept.Level", String.valueOf(RankUtils.getUnlockLevel(SubSkillType.SALVAGE_ARCANE_SALVAGE)), StringUtils.getPrettyItemString(item.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Salvage.Skills.Adept.Level", String.valueOf(RankUtils.getUnlockLevel(SubSkillType.SALVAGE_ARCANE_SALVAGE)), StringUtils.getPrettyItemString(item.getType()));
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -94,7 +93,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        int salvageableAmount = maxAmountSalvageable;
 | 
					        int salvageableAmount = maxAmountSalvageable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (salvageableAmount == 0) {
 | 
					        if (salvageableAmount == 0) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.TooDamaged");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.TooDamaged");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -126,11 +125,11 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if(lotteryResults == salvageableAmount) {
 | 
					        if(lotteryResults == salvageableAmount) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Perfect", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Perfect", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
				
			||||||
        } else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
 | 
					        } else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformationChatOnly(player,  "Salvage.Skills.Lottery.Normal", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformationChatOnly(player,  "Salvage.Skills.Lottery.Normal", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            NotificationManager.sendPlayerInformationChatOnly(player,  "Salvage.Skills.Lottery.Untrained", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformationChatOnly(player,  "Salvage.Skills.Lottery.Untrained", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ItemStack salvageResults = new ItemStack(salvageable.getSalvagedItemMaterial(), lotteryResults);
 | 
					        ItemStack salvageResults = new ItemStack(salvageable.getSalvagedItemMaterial(), lotteryResults);
 | 
				
			||||||
@@ -153,7 +152,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
            //player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1.0F, 1.0F);
 | 
					            //player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1.0F, 1.0F);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Salvage.Skills.Success");
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Salvage.Skills.Success");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*public double getMaxSalvagePercentage() {
 | 
					    /*public double getMaxSalvagePercentage() {
 | 
				
			||||||
@@ -212,7 +211,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        Player player = getPlayer();
 | 
					        Player player = getPlayer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE) || !Permissions.arcaneSalvage(player)) {
 | 
					        if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE) || !Permissions.arcaneSalvage(player)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcaneFailed");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcaneFailed");
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -238,10 +237,10 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (failedAllEnchants(arcaneFailureCount, enchants.entrySet().size())) {
 | 
					        if (failedAllEnchants(arcaneFailureCount, enchants.entrySet().size())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcaneFailed");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcaneFailed");
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        } else if (downgraded) {
 | 
					        } else if (downgraded) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcanePartial");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Salvage.Skills.ArcanePartial");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        book.setItemMeta(enchantMeta);
 | 
					        book.setItemMeta(enchantMeta);
 | 
				
			||||||
@@ -272,7 +271,7 @@ public class SalvageManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        actualizeLastAnvilUse();
 | 
					        actualizeLastAnvilUse();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Skills.ConfirmOrCancel", LocaleLoader.getString("Salvage.Pretty.Name"));
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Skills.ConfirmOrCancel", LocaleLoader.getString("Salvage.Pretty.Name"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,11 +7,11 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
					import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
					import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
 | 
					import com.gmail.nossr50.runnables.skills.BleedTimerTask;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.ItemUtils;
 | 
					import com.gmail.nossr50.util.ItemUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.CombatUtils;
 | 
					import com.gmail.nossr50.util.skills.CombatUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -70,16 +70,16 @@ public class SwordsManager extends SkillManager {
 | 
				
			|||||||
                if (defender.isBlocking())
 | 
					                if (defender.isBlocking())
 | 
				
			||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (NotificationManager.doesPlayerUseNotifications(defender)) {
 | 
					                if (mcMMO.getNotificationManager().doesPlayerUseNotifications(defender)) {
 | 
				
			||||||
                    if (!BleedTimerTask.isBleeding(defender))
 | 
					                    if (!BleedTimerTask.isBleeding(defender))
 | 
				
			||||||
                        NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
 | 
					                        mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            BleedTimerTask.add(target, getPlayer(), getRuptureBleedTicks(), RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_RUPTURE), getToolTier(getPlayer().getInventory().getItemInMainHand()));
 | 
					            BleedTimerTask.add(target, getPlayer(), getRuptureBleedTicks(), RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_RUPTURE), getToolTier(getPlayer().getInventory().getItemInMainHand()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (mcMMOPlayer.useChatNotifications()) {
 | 
					            if (mcMMOPlayer.useChatNotifications()) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -125,10 +125,10 @@ public class SwordsManager extends SkillManager {
 | 
				
			|||||||
        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_COUNTER_ATTACK, getPlayer())) {
 | 
					        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_COUNTER_ATTACK, getPlayer())) {
 | 
				
			||||||
            CombatUtils.dealDamage(attacker, damage / AdvancedConfig.getInstance().getCounterAttackModifier(), getPlayer());
 | 
					            CombatUtils.dealDamage(attacker, damage / AdvancedConfig.getInstance().getCounterAttackModifier(), getPlayer());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Countered");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Countered");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (attacker instanceof Player) {
 | 
					            if (attacker instanceof Player) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation((Player) attacker, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Counter.Hit");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation((Player) attacker, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Counter.Hit");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,6 @@ import com.gmail.nossr50.skills.SkillManager;
 | 
				
			|||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
					import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
					import com.gmail.nossr50.util.skills.ParticleEffectUtils;
 | 
				
			||||||
@@ -144,10 +143,10 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
        BleedTimerTask.add(target, getPlayer(), Taming.getInstance().getGoreBleedTicks(), 1, 2);
 | 
					        BleedTimerTask.add(target, getPlayer(), Taming.getInstance().getGoreBleedTicks(), 1, 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (target instanceof Player) {
 | 
					        if (target instanceof Player) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Combat.StruckByGore");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation((Player) target, NotificationType.SUBSKILL_MESSAGE, "Combat.StruckByGore");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.Gore");
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.Gore");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        damage = (damage * Taming.getInstance().getGoreModifier()) - damage;
 | 
					        damage = (damage * Taming.getInstance().getGoreModifier()) - damage;
 | 
				
			||||||
        return damage;
 | 
					        return damage;
 | 
				
			||||||
@@ -226,7 +225,7 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
        Player owner = getPlayer();
 | 
					        Player owner = getPlayer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        wolf.teleport(owner);
 | 
					        wolf.teleport(owner);
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(owner, NotificationType.SUBSKILL_MESSAGE, "Taming.Listener.Wolf");
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(owner, NotificationType.SUBSKILL_MESSAGE, "Taming.Listener.Wolf");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void pummel(LivingEntity target, Wolf wolf) {
 | 
					    public void pummel(LivingEntity target, Wolf wolf) {
 | 
				
			||||||
@@ -242,8 +241,8 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
        if (target instanceof Player) {
 | 
					        if (target instanceof Player) {
 | 
				
			||||||
            Player defender = (Player) target;
 | 
					            Player defender = (Player) target;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (NotificationManager.doesPlayerUseNotifications(defender)) {
 | 
					            if (mcMMO.getNotificationManager().doesPlayerUseNotifications(defender)) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Taming.SubSkill.Pummel.TargetMessage");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Taming.SubSkill.Pummel.TargetMessage");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -288,7 +287,7 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (heldItemAmount < summonAmount) {
 | 
					        if (heldItemAmount < summonAmount) {
 | 
				
			||||||
            int moreAmount = summonAmount - heldItemAmount;
 | 
					            int moreAmount = summonAmount - heldItemAmount;
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.NotEnough", String.valueOf(moreAmount), StringUtils.getPrettyItemString(heldItem.getType()));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.NotEnough", String.valueOf(moreAmount), StringUtils.getPrettyItemString(heldItem.getType()));
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -361,7 +360,7 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
            lifeSpan = LocaleLoader.getString("Taming.Summon.Lifespan", tamingCOTWLength);
 | 
					            lifeSpan = LocaleLoader.getString("Taming.Summon.Lifespan", tamingCOTWLength);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Taming.Summon.Complete", lifeSpan);
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Taming.Summon.Complete", lifeSpan);
 | 
				
			||||||
        player.playSound(location, Sound.ENTITY_FIREWORK_ROCKET_BLAST_FAR, 1F, 0.5F);
 | 
					        player.playSound(location, Sound.ENTITY_FIREWORK_ROCKET_BLAST_FAR, 1F, 0.5F);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -375,7 +374,7 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        for (Entity entity : player.getNearbyEntities(range, range, range)) {
 | 
					        for (Entity entity : player.getNearbyEntities(range, range, range)) {
 | 
				
			||||||
            if (entity.getType() == type) {
 | 
					            if (entity.getType() == type) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, Taming.getInstance().getCallOfTheWildFailureMessage(type));
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, Taming.getInstance().getCallOfTheWildFailureMessage(type));
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -396,7 +395,7 @@ public class TamingManager extends SkillManager {
 | 
				
			|||||||
        int summonAmount = trackedEntities == null ? 0 : trackedEntities.size();
 | 
					        int summonAmount = trackedEntities == null ? 0 : trackedEntities.size();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (summonAmount >= maxAmountSummons) {
 | 
					        if (summonAmount >= maxAmountSummons) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Taming.Summon.Fail.TooMany", String.valueOf(maxAmountSummons));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Taming.Summon.Fail.TooMany", String.valueOf(maxAmountSummons));
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,12 +8,12 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
					import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
					import com.gmail.nossr50.datatypes.skills.ToolType;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.util.EventUtils;
 | 
					import com.gmail.nossr50.util.EventUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.ItemUtils;
 | 
					import com.gmail.nossr50.util.ItemUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.Permissions;
 | 
					import com.gmail.nossr50.util.Permissions;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -111,7 +111,7 @@ public class UnarmedManager extends SkillManager {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            defender.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
 | 
					            defender.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Skills.Disarmed");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Skills.Disarmed");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -120,7 +120,7 @@ public class UnarmedManager extends SkillManager {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public boolean deflectCheck() {
 | 
					    public boolean deflectCheck() {
 | 
				
			||||||
        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.UNARMED_ARROW_DEFLECT, getPlayer())) {
 | 
					        if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.UNARMED_ARROW_DEFLECT, getPlayer())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.ArrowDeflect");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Combat.ArrowDeflect");
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -172,8 +172,8 @@ public class UnarmedManager extends SkillManager {
 | 
				
			|||||||
    private boolean hasIronGrip(Player defender) {
 | 
					    private boolean hasIronGrip(Player defender) {
 | 
				
			||||||
        if (!Misc.isNPCEntity(defender) && Permissions.isSubSkillEnabled(defender, SubSkillType.UNARMED_IRON_GRIP)
 | 
					        if (!Misc.isNPCEntity(defender) && Permissions.isSubSkillEnabled(defender, SubSkillType.UNARMED_IRON_GRIP)
 | 
				
			||||||
                && RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.UNARMED_IRON_GRIP, getPlayer())) {
 | 
					                && RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.UNARMED_IRON_GRIP, getPlayer())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Unarmed.Ability.IronGrip.Defender");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Unarmed.Ability.IronGrip.Defender");
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Unarmed.Ability.IronGrip.Attacker");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Unarmed.Ability.IronGrip.Attacker");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,10 +6,10 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.SubSkillType;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
					import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
 | 
				
			||||||
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.skills.SkillManager;
 | 
					import com.gmail.nossr50.skills.SkillManager;
 | 
				
			||||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting.ExperienceGainMethod;
 | 
					import com.gmail.nossr50.skills.woodcutting.Woodcutting.ExperienceGainMethod;
 | 
				
			||||||
import com.gmail.nossr50.util.*;
 | 
					import com.gmail.nossr50.util.*;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
					import com.gmail.nossr50.util.random.RandomChanceUtil;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.CombatUtils;
 | 
					import com.gmail.nossr50.util.skills.CombatUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.RankUtils;
 | 
					import com.gmail.nossr50.util.skills.RankUtils;
 | 
				
			||||||
@@ -85,13 +85,13 @@ public class WoodcuttingManager extends SkillManager {
 | 
				
			|||||||
        if (Woodcutting.treeFellerReachedThreshold) {
 | 
					        if (Woodcutting.treeFellerReachedThreshold) {
 | 
				
			||||||
            Woodcutting.treeFellerReachedThreshold = false;
 | 
					            Woodcutting.treeFellerReachedThreshold = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Woodcutting.Skills.TreeFeller.Threshold");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Woodcutting.Skills.TreeFeller.Threshold");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // If the tool can't sustain the durability loss
 | 
					        // If the tool can't sustain the durability loss
 | 
				
			||||||
        if (!Woodcutting.handleDurabilityLoss(treeFellerBlocks, player.getInventory().getItemInMainHand())) {
 | 
					        if (!Woodcutting.handleDurabilityLoss(treeFellerBlocks, player.getInventory().getItemInMainHand())) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Woodcutting.Skills.TreeFeller.Splinter");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE_FAILED, "Woodcutting.Skills.TreeFeller.Splinter");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            double health = player.getHealth();
 | 
					            double health = player.getHealth();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,6 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 | 
				
			|||||||
import com.gmail.nossr50.locale.LocaleLoader;
 | 
					import com.gmail.nossr50.locale.LocaleLoader;
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup;
 | 
					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.player.UserManager;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.CombatUtils;
 | 
					import com.gmail.nossr50.util.skills.CombatUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.skills.SkillUtils;
 | 
					import com.gmail.nossr50.util.skills.SkillUtils;
 | 
				
			||||||
@@ -48,7 +47,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!Permissions.chimaeraWing(player)) {
 | 
					        if (!Permissions.chimaeraWing(player)) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.NO_PERMISSION, "mcMMO.NoPermission");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,7 +64,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
        int amount = inHand.getAmount();
 | 
					        int amount = inHand.getAmount();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (amount < mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost()) {
 | 
					        if (amount < mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost()) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.NotEnough",
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.NotEnough",
 | 
				
			||||||
                    String.valueOf(mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost() - amount), "Item.ChimaeraWing.Name");
 | 
					                    String.valueOf(mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost() - amount), "Item.ChimaeraWing.Name");
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -77,7 +76,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
            int timeRemaining = SkillUtils.calculateTimeLeft(lastTeleport * Misc.TIME_CONVERSION_FACTOR, cooldown, player);
 | 
					            int timeRemaining = SkillUtils.calculateTimeLeft(lastTeleport * Misc.TIME_CONVERSION_FACTOR, cooldown, player);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (timeRemaining > 0) {
 | 
					            if (timeRemaining > 0) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Item.Generic.Wait", String.valueOf(timeRemaining));
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Item.Generic.Wait", String.valueOf(timeRemaining));
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -89,7 +88,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
            int timeRemaining = SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, hurtCooldown, player);
 | 
					            int timeRemaining = SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, hurtCooldown, player);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (timeRemaining > 0) {
 | 
					            if (timeRemaining > 0) {
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.Injured.Wait", String.valueOf(timeRemaining));
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.Injured.Wait", String.valueOf(timeRemaining));
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -99,7 +98,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
        if (mcMMO.getConfigManager().getConfigItems().isPreventUndergroundUse()) {
 | 
					        if (mcMMO.getConfigManager().getConfigItems().isPreventUndergroundUse()) {
 | 
				
			||||||
            if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
 | 
					            if (location.getY() < player.getWorld().getHighestBlockYAt(location)) {
 | 
				
			||||||
                player.getInventory().setItemInMainHand(new ItemStack(getChimaeraWing(amount - mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost())));
 | 
					                player.getInventory().setItemInMainHand(new ItemStack(getChimaeraWing(amount - mcMMO.getConfigManager().getConfigItems().getChimaeraWingUseCost())));
 | 
				
			||||||
                NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.Fail");
 | 
					                mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Item.ChimaeraWing.Fail");
 | 
				
			||||||
                player.updateInventory();
 | 
					                player.updateInventory();
 | 
				
			||||||
                player.setVelocity(new Vector(0, 0.5D, 0));
 | 
					                player.setVelocity(new Vector(0, 0.5D, 0));
 | 
				
			||||||
                CombatUtils.dealDamage(player, Misc.getRandom().nextInt((int) (player.getHealth() - 10)));
 | 
					                CombatUtils.dealDamage(player, Misc.getRandom().nextInt((int) (player.getHealth() - 10)));
 | 
				
			||||||
@@ -113,7 +112,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
        long warmup = mcMMO.getConfigManager().getConfigItems().getChimaeraWingWarmup();
 | 
					        long warmup = mcMMO.getConfigManager().getConfigItems().getChimaeraWingWarmup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (warmup > 0) {
 | 
					        if (warmup > 0) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Teleport.Commencing", String.valueOf(warmup));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Teleport.Commencing", String.valueOf(warmup));
 | 
				
			||||||
            new ChimaeraWingWarmup(mcMMOPlayer).runTaskLater(mcMMO.p, 20 * warmup);
 | 
					            new ChimaeraWingWarmup(mcMMOPlayer).runTaskLater(mcMMO.p, 20 * warmup);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            chimaeraExecuteTeleport();
 | 
					            chimaeraExecuteTeleport();
 | 
				
			||||||
@@ -143,7 +142,7 @@ public final class ChimaeraWing {
 | 
				
			|||||||
            SoundManager.sendSound(player, location, SoundType.CHIMAERA_WING);
 | 
					            SoundManager.sendSound(player, location, SoundType.CHIMAERA_WING);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.ChimaeraWing.Pass");
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.ITEM_MESSAGE, "Item.ChimaeraWing.Pass");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static ItemStack getChimaeraWing(int amount) {
 | 
					    public static ItemStack getChimaeraWing(int amount) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,6 @@ import com.gmail.nossr50.datatypes.interactions.NotificationType;
 | 
				
			|||||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
 | 
					import com.gmail.nossr50.datatypes.player.PlayerProfile;
 | 
				
			||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
					import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
 | 
				
			||||||
import com.gmail.nossr50.mcMMO;
 | 
					import com.gmail.nossr50.mcMMO;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import org.bukkit.entity.Player;
 | 
					import org.bukkit.entity.Player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,7 +55,7 @@ public final class HardcoreManager {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        NotificationManager.sendPlayerInformation(player, NotificationType.HARDCORE_MODE, "Hardcore.DeathStatLoss.PlayerDeath", String.valueOf(totalLevelsLost));
 | 
					        mcMMO.getNotificationManager().sendPlayerInformation(player, NotificationType.HARDCORE_MODE, "Hardcore.DeathStatLoss.PlayerDeath", String.valueOf(totalLevelsLost));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void invokeVampirism(Player killer, Player victim) {
 | 
					    public static void invokeVampirism(Player killer, Player victim) {
 | 
				
			||||||
@@ -105,11 +104,11 @@ public final class HardcoreManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (totalLevelsStolen > 0) {
 | 
					        if (totalLevelsStolen > 0) {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(killer, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Killer.Success", String.valueOf(totalLevelsStolen), victim.getName());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(killer, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Killer.Success", String.valueOf(totalLevelsStolen), victim.getName());
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(victim, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Victim.Success", killer.getName(), String.valueOf(totalLevelsStolen));
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(victim, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Victim.Success", killer.getName(), String.valueOf(totalLevelsStolen));
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(killer, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Killer.Failure", victim.getName());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(killer, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Killer.Failure", victim.getName());
 | 
				
			||||||
            NotificationManager.sendPlayerInformation(victim, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Victim.Failure", killer.getName());
 | 
					            mcMMO.getNotificationManager().sendPlayerInformation(victim, NotificationType.HARDCORE_MODE, "Hardcore.Vampirism.Victim.Failure", killer.getName());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param notificationType notifications defined type
 | 
					     * @param notificationType notifications defined type
 | 
				
			||||||
     * @param key              the locale key for the notifications defined message
 | 
					     * @param key              the locale key for the notifications defined message
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void sendPlayerInformation(Player player, NotificationType notificationType, String key) {
 | 
					    public void sendPlayerInformation(Player player, NotificationType notificationType, String key) {
 | 
				
			||||||
        if (UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
					        if (UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -44,7 +44,7 @@ public class NotificationManager {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static boolean doesPlayerUseNotifications(Player player) {
 | 
					    public boolean doesPlayerUseNotifications(Player player) {
 | 
				
			||||||
        if (UserManager.getPlayer(player) == null)
 | 
					        if (UserManager.getPlayer(player) == null)
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
@@ -60,12 +60,12 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param key              Locale Key for the string to use with this event
 | 
					     * @param key              Locale Key for the string to use with this event
 | 
				
			||||||
     * @param values           values to be injected into the locale string
 | 
					     * @param values           values to be injected into the locale string
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void sendNearbyPlayersInformation(Player targetPlayer, NotificationType notificationType, String key, String... values)
 | 
					    public void sendNearbyPlayersInformation(Player targetPlayer, NotificationType notificationType, String key, String... values)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        sendPlayerInformation(targetPlayer, notificationType, key, values);
 | 
					        sendPlayerInformation(targetPlayer, notificationType, key, values);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void sendPlayerInformationChatOnly(Player player, String key, String... values)
 | 
					    public void sendPlayerInformationChatOnly(Player player, String key, String... values)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
					        if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
@@ -74,7 +74,7 @@ public class NotificationManager {
 | 
				
			|||||||
        player.sendMessage(preColoredString);
 | 
					        player.sendMessage(preColoredString);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void sendPlayerInformation(Player player, NotificationType notificationType, String key, String... values)
 | 
					    public void sendPlayerInformation(Player player, NotificationType notificationType, String key, String... values)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
					        if(UserManager.getPlayer(player) == null || !UserManager.getPlayer(player).useChatNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
@@ -87,7 +87,7 @@ public class NotificationManager {
 | 
				
			|||||||
        sendNotification(player, customEvent);
 | 
					        sendNotification(player, customEvent);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static void sendNotification(Player player, McMMOPlayerNotificationEvent customEvent) {
 | 
					    private void sendNotification(Player player, McMMOPlayerNotificationEvent customEvent) {
 | 
				
			||||||
        if (customEvent.isCancelled())
 | 
					        if (customEvent.isCancelled())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -104,7 +104,7 @@ public class NotificationManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static McMMOPlayerNotificationEvent checkNotificationEvent(Player player, NotificationType notificationType, ChatMessageType destination, TextComponent message) {
 | 
					    private McMMOPlayerNotificationEvent checkNotificationEvent(Player player, NotificationType notificationType, ChatMessageType destination, TextComponent message) {
 | 
				
			||||||
        //Init event
 | 
					        //Init event
 | 
				
			||||||
        McMMOPlayerNotificationEvent customEvent = new McMMOPlayerNotificationEvent(player,
 | 
					        McMMOPlayerNotificationEvent customEvent = new McMMOPlayerNotificationEvent(player,
 | 
				
			||||||
                notificationType, message, destination, AdvancedConfig.getInstance().doesNotificationSendCopyToChat(notificationType));
 | 
					                notificationType, message, destination, AdvancedConfig.getInstance().doesNotificationSendCopyToChat(notificationType));
 | 
				
			||||||
@@ -121,7 +121,7 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param skillName   skill that leveled up
 | 
					     * @param skillName   skill that leveled up
 | 
				
			||||||
     * @param newLevel    new level of that skill
 | 
					     * @param newLevel    new level of that skill
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void sendPlayerLevelUpNotification(McMMOPlayer mcMMOPlayer, PrimarySkillType skillName, int levelsGained, int newLevel) {
 | 
					    public void sendPlayerLevelUpNotification(McMMOPlayer mcMMOPlayer, PrimarySkillType skillName, int levelsGained, int newLevel) {
 | 
				
			||||||
        if (!mcMMOPlayer.useChatNotifications())
 | 
					        if (!mcMMOPlayer.useChatNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -133,13 +133,13 @@ public class NotificationManager {
 | 
				
			|||||||
        sendNotification(mcMMOPlayer.getPlayer(), customEvent);
 | 
					        sendNotification(mcMMOPlayer.getPlayer(), customEvent);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void broadcastTitle(Server server, String title, String subtitle, int i1, int i2, int i3) {
 | 
					    public void broadcastTitle(Server server, String title, String subtitle, int i1, int i2, int i3) {
 | 
				
			||||||
        for (Player player : server.getOnlinePlayers()) {
 | 
					        for (Player player : server.getOnlinePlayers()) {
 | 
				
			||||||
            player.sendTitle(title, subtitle, i1, i2, i3);
 | 
					            player.sendTitle(title, subtitle, i1, i2, i3);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static void sendPlayerUnlockNotification(McMMOPlayer mcMMOPlayer, SubSkillType subSkillType) {
 | 
					    public void sendPlayerUnlockNotification(McMMOPlayer mcMMOPlayer, SubSkillType subSkillType) {
 | 
				
			||||||
        if (!mcMMOPlayer.useChatNotifications())
 | 
					        if (!mcMMOPlayer.useChatNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -163,7 +163,7 @@ public class NotificationManager {
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param msg message fetched from locale
 | 
					     * @param msg message fetched from locale
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private static void sendAdminNotification(String msg) {
 | 
					    private void sendAdminNotification(String msg) {
 | 
				
			||||||
        //If its not enabled exit
 | 
					        //If its not enabled exit
 | 
				
			||||||
        if (!mcMMO.getConfigManager().getConfigAdmin().isSendAdminNotifications())
 | 
					        if (!mcMMO.getConfigManager().getConfigAdmin().isSendAdminNotifications())
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
@@ -184,7 +184,7 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param commandSender target command sender
 | 
					     * @param commandSender target command sender
 | 
				
			||||||
     * @param msg           message fetched from locale
 | 
					     * @param msg           message fetched from locale
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private static void sendAdminCommandConfirmation(CommandSender commandSender, String msg) {
 | 
					    private void sendAdminCommandConfirmation(CommandSender commandSender, String msg) {
 | 
				
			||||||
        commandSender.sendMessage(LocaleLoader.getString("Notifications.Admin.Format.Self", msg));
 | 
					        commandSender.sendMessage(LocaleLoader.getString("Notifications.Admin.Format.Self", msg));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -194,7 +194,7 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param commandSender        the command user
 | 
					     * @param commandSender        the command user
 | 
				
			||||||
     * @param sensitiveCommandType type of command issued
 | 
					     * @param sensitiveCommandType type of command issued
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static void processSensitiveCommandNotification(CommandSender commandSender, SensitiveCommandType sensitiveCommandType, String... args) {
 | 
					    public void processSensitiveCommandNotification(CommandSender commandSender, SensitiveCommandType sensitiveCommandType, String... args) {
 | 
				
			||||||
        /*
 | 
					        /*
 | 
				
			||||||
         * Determine the 'identity' of the one who executed the command to pass as a parameters
 | 
					         * Determine the 'identity' of the one who executed the command to pass as a parameters
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
@@ -225,7 +225,7 @@ public class NotificationManager {
 | 
				
			|||||||
     * @param existingArray the existing array to be copied to the new array at position [0]+1 relative to their original index
 | 
					     * @param existingArray the existing array to be copied to the new array at position [0]+1 relative to their original index
 | 
				
			||||||
     * @return the new array combining itemToAdd at the start and existing array elements following while retaining their order
 | 
					     * @return the new array combining itemToAdd at the start and existing array elements following while retaining their order
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static String[] addItemToFirstPositionOfArray(String itemToAdd, String... existingArray) {
 | 
					    public String[] addItemToFirstPositionOfArray(String itemToAdd, String... existingArray) {
 | 
				
			||||||
        String[] newArray = new String[existingArray.length + 1];
 | 
					        String[] newArray = new String[existingArray.length + 1];
 | 
				
			||||||
        newArray[0] = itemToAdd;
 | 
					        newArray[0] = itemToAdd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,6 @@ import com.gmail.nossr50.skills.taming.TamingManager;
 | 
				
			|||||||
import com.gmail.nossr50.skills.unarmed.Unarmed;
 | 
					import com.gmail.nossr50.skills.unarmed.Unarmed;
 | 
				
			||||||
import com.gmail.nossr50.skills.unarmed.UnarmedManager;
 | 
					import com.gmail.nossr50.skills.unarmed.UnarmedManager;
 | 
				
			||||||
import com.gmail.nossr50.util.*;
 | 
					import com.gmail.nossr50.util.*;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import com.gmail.nossr50.util.player.UserManager;
 | 
					import com.gmail.nossr50.util.player.UserManager;
 | 
				
			||||||
import com.google.common.collect.ImmutableMap;
 | 
					import com.google.common.collect.ImmutableMap;
 | 
				
			||||||
import org.bukkit.GameMode;
 | 
					import org.bukkit.GameMode;
 | 
				
			||||||
@@ -519,7 +518,7 @@ public final class CombatUtils {
 | 
				
			|||||||
            switch (type) {
 | 
					            switch (type) {
 | 
				
			||||||
                case SWORDS:
 | 
					                case SWORDS:
 | 
				
			||||||
                    if (entity instanceof Player) {
 | 
					                    if (entity instanceof Player) {
 | 
				
			||||||
                        NotificationManager.sendPlayerInformation((Player) entity, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.SS.Struck");
 | 
					                        mcMMO.getNotificationManager().sendPlayerInformation((Player) entity, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.SS.Struck");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    UserManager.getPlayer(attacker).getSwordsManager().ruptureCheck(target);
 | 
					                    UserManager.getPlayer(attacker).getSwordsManager().ruptureCheck(target);
 | 
				
			||||||
@@ -527,7 +526,7 @@ public final class CombatUtils {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                case AXES:
 | 
					                case AXES:
 | 
				
			||||||
                    if (entity instanceof Player) {
 | 
					                    if (entity instanceof Player) {
 | 
				
			||||||
                        NotificationManager.sendPlayerInformation((Player) entity, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.SS.Struck");
 | 
					                        mcMMO.getNotificationManager().sendPlayerInformation((Player) entity, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.SS.Struck");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,6 @@ import com.gmail.nossr50.mcMMO;
 | 
				
			|||||||
import com.gmail.nossr50.util.ItemUtils;
 | 
					import com.gmail.nossr50.util.ItemUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.Misc;
 | 
					import com.gmail.nossr50.util.Misc;
 | 
				
			||||||
import com.gmail.nossr50.util.StringUtils;
 | 
					import com.gmail.nossr50.util.StringUtils;
 | 
				
			||||||
import com.gmail.nossr50.util.player.NotificationManager;
 | 
					 | 
				
			||||||
import org.bukkit.Bukkit;
 | 
					import org.bukkit.Bukkit;
 | 
				
			||||||
import org.bukkit.Location;
 | 
					import org.bukkit.Location;
 | 
				
			||||||
import org.bukkit.Material;
 | 
					import org.bukkit.Material;
 | 
				
			||||||
@@ -118,7 +117,7 @@ public class SkillUtils {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        for (Player otherPlayer : player.getWorld().getPlayers()) {
 | 
					        for (Player otherPlayer : player.getWorld().getPlayers()) {
 | 
				
			||||||
            if (otherPlayer != player && Misc.isNear(location, otherPlayer.getLocation(), Misc.SKILL_MESSAGE_MAX_SENDING_DISTANCE)) {
 | 
					            if (otherPlayer != player && Misc.isNear(location, otherPlayer.getLocation(), Misc.SKILL_MESSAGE_MAX_SENDING_DISTANCE)) {
 | 
				
			||||||
                NotificationManager.sendNearbyPlayersInformation(otherPlayer, notificationType, key, player.getName());
 | 
					                mcMMO.getNotificationManager().sendNearbyPlayersInformation(otherPlayer, notificationType, key, player.getName());
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user