Handle Fishing Event even if FishingExploitFix is set to false

This commit is contained in:
Ineusia 2020-07-25 10:36:34 -05:00
parent 2910240942
commit 054c023330

View File

@ -396,11 +396,9 @@ public class PlayerListener implements Listener {
} }
return; return;
case CAUGHT_FISH: case CAUGHT_FISH:
if(ExperienceConfig.getInstance().isFishingExploitingPrevented()) if(caught instanceof Item) {
{ if(ExperienceConfig.getInstance().isFishingExploitingPrevented()) {
if(caught instanceof Item) { if (fishingManager.isExploitingFishing(event.getHook().getLocation().toVector())) {
if(fishingManager.isExploitingFishing(event.getHook().getLocation().toVector()))
{
player.sendMessage(LocaleLoader.getString("Fishing.ScarcityTip", 3)); player.sendMessage(LocaleLoader.getString("Fishing.ScarcityTip", 3));
event.setExpToDrop(0); event.setExpToDrop(0);
Item caughtItem = (Item) caught; Item caughtItem = (Item) caught;
@ -408,10 +406,10 @@ public class PlayerListener implements Listener {
return; return;
} }
fishingManager.handleFishing((Item) caught);
fishingManager.setFishingTarget();
} }
fishingManager.handleFishing((Item) caught);
fishingManager.setFishingTarget();
} }
return; return;
case CAUGHT_ENTITY: case CAUGHT_ENTITY: