Move more event handling back into the main listener to avoid passing

the event itself.
This commit is contained in:
GJ
2013-02-22 17:55:15 -05:00
parent 6c6ab4c96e
commit 2fee9df625
10 changed files with 153 additions and 232 deletions

View File

@ -1,5 +1,6 @@
package com.gmail.nossr50.skills.acrobatics;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import com.gmail.nossr50.config.AdvancedConfig;
@ -33,6 +34,10 @@ public final class Acrobatics {
private Acrobatics() {};
public static boolean canRoll(Player player) {
return (player.getItemInHand().getType() != Material.ENDER_PEARL) && !(afkLevelingDisabled && player.isInsideVehicle()) && Permissions.roll(player);
}
public static int processRoll(Player player, int damage) {
if (player.isSneaking() && Permissions.gracefulRoll(player)) {
return processGracefulRoll(player, damage);