Search in sources :

Example 1 with KeyStreak

use of net.laboulangerie.laboulangeriemmo.core.combo.KeyStreak in project LaBoulangerieMmo by LaBoulangerie.

the class FastMine method shouldTrigger.

@Override
public boolean shouldTrigger(Event baseEvent) {
    ComboCompletedEvent event = (ComboCompletedEvent) baseEvent;
    ItemStack item = event.getPlayer().getInventory().getItemInMainHand();
    return item != null && (item.getType() == Material.NETHERITE_PICKAXE || item.getType() == Material.DIAMOND_PICKAXE || item.getType() == Material.IRON_PICKAXE) && event.getKeyStreak().match(new KeyStreak(ComboKey.LEFT, ComboKey.LEFT, ComboKey.LEFT));
}
Also used : KeyStreak(net.laboulangerie.laboulangeriemmo.core.combo.KeyStreak) ComboCompletedEvent(net.laboulangerie.laboulangeriemmo.events.ComboCompletedEvent) ItemStack(org.bukkit.inventory.ItemStack)

Aggregations

KeyStreak (net.laboulangerie.laboulangeriemmo.core.combo.KeyStreak)1 ComboCompletedEvent (net.laboulangerie.laboulangeriemmo.events.ComboCompletedEvent)1 ItemStack (org.bukkit.inventory.ItemStack)1