mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Move more event handling back into the main listener to avoid passing
the event itself.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user