Merge pull request #4229 from Ineusia/issue-4224

Handle Fishing Event even if FishingExploitFix is set to false
This commit is contained in:
Robert Alan Chapton 2020-07-25 08:38:04 -07:00 committed by GitHub
commit 1df2225aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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