From 9acf597eb9cf3fd31c6e24a62677704ee567db43 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 2 Apr 2019 23:35:33 -0700 Subject: [PATCH] Fixing PlayerListener --- .../com/gmail/nossr50/listeners/PlayerListener.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index ab9adcde0..efb9c60fb 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners; import com.gmail.nossr50.chat.ChatManager; import com.gmail.nossr50.chat.ChatManagerFactory; import com.gmail.nossr50.chat.PartyChatManager; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.MainConfig; import com.gmail.nossr50.config.WorldBlacklist; import com.gmail.nossr50.config.experience.ExperienceConfig; @@ -565,7 +566,7 @@ public class PlayerListener implements Listener { if (!mcMMO.getConfigManager().getConfigSuperAbilities().isMustSneakToActivate() || player.isSneaking()) { /* REPAIR CHECKS */ - if (type == Repair.anvilMaterial && PrimarySkillType.REPAIR.getPermissions(player) && mcMMO.getRepairableManager().isRepairable(heldItem)) { + if (type == Repair.getInstance().getAnvilMaterial() && PrimarySkillType.REPAIR.getPermissions(player) && mcMMO.getRepairableManager().isRepairable(heldItem)) { RepairManager repairManager = mcMMOPlayer.getRepairManager(); event.setCancelled(true); @@ -605,7 +606,7 @@ public class PlayerListener implements Listener { if (!mcMMO.getConfigManager().getConfigSuperAbilities().isMustSneakToActivate() || player.isSneaking()) { /* REPAIR CHECKS */ - if (type == Repair.anvilMaterial && PrimarySkillType.REPAIR.getPermissions(player) && mcMMO.getRepairableManager().isRepairable(heldItem)) { + if (type == Repair.getInstance().getAnvilMaterial() && PrimarySkillType.REPAIR.getPermissions(player) && mcMMO.getRepairableManager().isRepairable(heldItem)) { RepairManager repairManager = mcMMOPlayer.getRepairManager(); // Cancel repairing an enchanted item @@ -864,9 +865,9 @@ public class PlayerListener implements Listener { } } - @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + /*@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerStatisticIncrementEvent(PlayerStatisticIncrementEvent event) { - /* WORLD BLACKLIST CHECK */ + *//* WORLD BLACKLIST CHECK *//* if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) return; @@ -875,5 +876,5 @@ public class PlayerListener implements Listener { } mcMMO.getHolidayManager().handleStatisticEvent(event); - } + }*/ }