mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fix Maven build failure (#4779)
This commit is contained in:
parent
c40af913f4
commit
d543843235
@ -2,12 +2,13 @@ package com.gmail.nossr50.events.fake;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||||
|
import org.bukkit.event.player.PlayerAnimationType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when handling extra drops to avoid issues with NoCheat.
|
* Called when handling extra drops to avoid issues with NoCheat.
|
||||||
*/
|
*/
|
||||||
public class FakePlayerAnimationEvent extends PlayerAnimationEvent implements FakeEvent {
|
public class FakePlayerAnimationEvent extends PlayerAnimationEvent implements FakeEvent {
|
||||||
public FakePlayerAnimationEvent(Player player) {
|
public FakePlayerAnimationEvent(Player player, PlayerAnimationType playerAnimationType) {
|
||||||
super(player);
|
super(player, playerAnimationType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -841,7 +841,7 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
HerbalismManager herbalismManager = mcMMOPlayer.getHerbalismManager();
|
HerbalismManager herbalismManager = mcMMOPlayer.getHerbalismManager();
|
||||||
|
|
||||||
FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(event.getPlayer()); //PlayerAnimationEvent compat
|
FakePlayerAnimationEvent fakeSwing = new FakePlayerAnimationEvent(event.getPlayer(), PlayerAnimationType.ARM_SWING); //PlayerAnimationEvent compat
|
||||||
if(!event.isCancelled() || event.useInteractedBlock() != Event.Result.DENY) {
|
if(!event.isCancelled() || event.useInteractedBlock() != Event.Result.DENY) {
|
||||||
//TODO: Is this code to set false from bone meal even needed? I'll have to double check later.
|
//TODO: Is this code to set false from bone meal even needed? I'll have to double check later.
|
||||||
if (heldItem.getType() == Material.BONE_MEAL) {
|
if (heldItem.getType() == Material.BONE_MEAL) {
|
||||||
|
@ -44,6 +44,7 @@ import org.bukkit.entity.LivingEntity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
|
import org.bukkit.event.player.PlayerAnimationType;
|
||||||
import org.bukkit.event.player.PlayerFishEvent;
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@ -225,7 +226,7 @@ public final class EventUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static FakePlayerAnimationEvent callFakeArmSwingEvent(Player player) {
|
public static FakePlayerAnimationEvent callFakeArmSwingEvent(Player player) {
|
||||||
FakePlayerAnimationEvent event = new FakePlayerAnimationEvent(player);
|
FakePlayerAnimationEvent event = new FakePlayerAnimationEvent(player, PlayerAnimationType.ARM_SWING);
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
|
Loading…
Reference in New Issue
Block a user