From 4586a07d7a0c09156061e7ec72c07a8b954132a6 Mon Sep 17 00:00:00 2001 From: smuddgge <68658429+smuddgge@users.noreply.github.com> Date: Wed, 1 Jun 2022 18:28:19 +0100 Subject: [PATCH] Removed redundant listener --- .../jobs/hooks/McMMO/McMMO1_X_listener.java | 28 ----------------- .../jobs/hooks/McMMO/McMMO2_X_listener.java | 31 ------------------- 2 files changed, 59 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO1_X_listener.java b/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO1_X_listener.java index ecbf24da..37ebff8d 100644 --- a/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO1_X_listener.java +++ b/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO1_X_listener.java @@ -21,34 +21,6 @@ import com.gmail.nossr50.events.skills.repair.McMMOPlayerRepairCheckEvent; public class McMMO1_X_listener implements Listener { - @EventHandler - public void onFishingTreasure(McMMOPlayerFishingTreasureEvent event) { - Player player = event.getPlayer(); - //disabling plugin in world - if (!Jobs.getGCManager().canPerformActionInWorld(player.getWorld())) - return; - - // check if in creative - if (!JobsPaymentListener.payIfCreative(player)) - return; - - if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName())) - return; - - // check if player is riding - if (Jobs.getGCManager().disablePaymentIfRiding && player.isInsideVehicle()) - return; - - if (!JobsPaymentListener.payForItemDurabilityLoss(player) || event.getTreasure() == null) - return; - - JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player); - if (jPlayer == null) - return; - - Jobs.action(jPlayer, new ItemActionInfo(event.getTreasure(), ActionType.FISH)); - } - @EventHandler public void OnItemrepair(McMMOPlayerRepairCheckEvent event) { Player player = event.getPlayer(); diff --git a/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO2_X_listener.java b/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO2_X_listener.java index 670bef57..5345f8a9 100644 --- a/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO2_X_listener.java +++ b/src/main/java/com/gamingmesh/jobs/hooks/McMMO/McMMO2_X_listener.java @@ -22,37 +22,6 @@ import com.gmail.nossr50.events.skills.repair.McMMOPlayerRepairCheckEvent; public class McMMO2_X_listener implements Listener { - @EventHandler - public void onFishingTreasure(McMMOPlayerFishingTreasureEvent event) { - Player player = event.getPlayer(); - //disabling plugin in world - if (!Jobs.getGCManager().canPerformActionInWorld(player.getWorld())) - return; - - // check if in creative - if (!JobsPaymentListener.payIfCreative(player)) - return; - - if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName())) - return; - - // check if player is riding - if (Jobs.getGCManager().disablePaymentIfRiding && player.isInsideVehicle()) - return; - - if (!JobsPaymentListener.payForItemDurabilityLoss(player)) - return; - - if (event.getTreasure() == null) - return; - - JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player); - if (jPlayer == null) - return; - - Jobs.action(jPlayer, new ItemActionInfo(event.getTreasure(), ActionType.FISH)); - } - @EventHandler public void OnItemrepair(McMMOPlayerRepairCheckEvent event) { Player player = event.getPlayer();