mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Cleanup exploit prevention method.
This commit is contained in:
		@@ -28,9 +28,7 @@ public class AcrobaticsManager extends SkillManager {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public boolean canRoll() {
 | 
					    public boolean canRoll() {
 | 
				
			||||||
        Player player = getPlayer();
 | 
					        return !exploitPrevention() && Permissions.roll(getPlayer());
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return !exploitPrevention() && Permissions.roll(player);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public boolean canDodge(Entity damager) {
 | 
					    public boolean canDodge(Entity damager) {
 | 
				
			||||||
@@ -128,15 +126,7 @@ public class AcrobaticsManager extends SkillManager {
 | 
				
			|||||||
    public boolean exploitPrevention() {
 | 
					    public boolean exploitPrevention() {
 | 
				
			||||||
        Player player = getPlayer();
 | 
					        Player player = getPlayer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (player.getItemInHand().getType() == Material.ENDER_PEARL) {
 | 
					        if (player.getItemInHand().getType() == Material.ENDER_PEARL || Config.getInstance().getAcrobaticsAFKDisabled() || player.isInsideVehicle()) {
 | 
				
			||||||
            return true;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (!Config.getInstance().getAcrobaticsAFKDisabled()) {
 | 
					 | 
				
			||||||
            return false;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (player.isInsideVehicle()) {
 | 
					 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user