diff --git a/libs/mcMMO-2.1.175-SNAPSHOT.jar b/libs/mcMMO-2.1.175-SNAPSHOT.jar new file mode 100644 index 00000000..e5ec2fc2 Binary files /dev/null and b/libs/mcMMO-2.1.175-SNAPSHOT.jar differ diff --git a/libs/mcMMO2.1.2.jar b/libs/mcMMO2.1.2.jar deleted file mode 100644 index 1087ebbe..00000000 Binary files a/libs/mcMMO2.1.2.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index 886406cd..d69e6e86 100644 --- a/pom.xml +++ b/pom.xml @@ -25,9 +25,9 @@ com.gmail.nossr50.mcMMO mcMMO - 2.1.2 + 2.1.175-SNAPSHOT system - ${basedir}/libs/mcMMO2.1.2.jar + ${basedir}/libs/mcMMO-2.1.175-SNAPSHOT.jar diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 26632666..daf300e1 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -28,6 +28,10 @@ import com.gamingmesh.jobs.container.blockOwnerShip.BlockOwnerShip; import com.gamingmesh.jobs.container.blockOwnerShip.BlockOwnerShip.ownershipFeedback; import com.gamingmesh.jobs.hooks.HookManager; import com.gamingmesh.jobs.hooks.JobsHook; +import com.gmail.nossr50.config.experience.ExperienceConfig; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.util.player.UserManager; import com.google.common.base.Objects; import org.bukkit.Bukkit; @@ -490,6 +494,17 @@ public class JobsPaymentListener implements Listener { return; if (event.getState() == PlayerFishEvent.State.CAUGHT_FISH && event.getCaught() instanceof Item) { + // check is mcMMO enabled + if (JobsHook.mcMMO.isEnabled()) { + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); + + // check is the fishing being exploited. If yes, prevent payment. + if (mcMMOPlayer != null && ExperienceConfig.getInstance().isFishingExploitingPrevented() + && mcMMOPlayer.getFishingManager().isExploitingFishing(event.getHook().getLocation().toVector())) { + return; + } + } + Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new ItemActionInfo(((Item) event.getCaught()).getItemStack(), ActionType.FISH)); }