Check configuration for fishing spam prevention (#4010)

This commit is contained in:
Shane Freeder 2019-08-12 03:54:07 +01:00
parent bb7989449e
commit dbecd289b2
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -718,7 +718,8 @@ public class PlayerListener implements Listener {
//Spam Fishing Detection //Spam Fishing Detection
if(event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) if(event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR)
{ {
if(heldItem.getType() == Material.FISHING_ROD || player.getInventory().getItemInOffHand().getType() == Material.FISHING_ROD) if(ExperienceConfig.getInstance().isFishingExploitingPrevented()
&& (heldItem.getType() == Material.FISHING_ROD || player.getInventory().getItemInOffHand().getType() == Material.FISHING_ROD))
{ {
if(player.isInsideVehicle() && (player.getVehicle() instanceof Minecart || player.getVehicle() instanceof PoweredMinecart)) if(player.isInsideVehicle() && (player.getVehicle() instanceof Minecart || player.getVehicle() instanceof PoweredMinecart))
{ {