mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
Cleanup
This commit is contained in:
parent
69f9c89959
commit
1339af2604
@ -1,6 +1,7 @@
|
||||
package net.Indyuce.mmoitems.api.interaction.weapon.untargeted;
|
||||
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Used to determine if the item must be left or right clicked in order to
|
||||
@ -13,8 +14,9 @@ public enum UntargetedWeaponType {
|
||||
RIGHT_CLICK,
|
||||
LEFT_CLICK;
|
||||
|
||||
public boolean corresponds(Action action) {
|
||||
return (this == RIGHT_CLICK && (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK))
|
||||
|| (this == LEFT_CLICK && (action == Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK));
|
||||
public boolean corresponds(@NotNull Action action) {
|
||||
return this == RIGHT_CLICK ?
|
||||
action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK :
|
||||
action == Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK;
|
||||
}
|
||||
}
|
||||
|
@ -494,6 +494,7 @@ public class Enchants extends ItemStat<RandomEnchantListData, EnchantListData> i
|
||||
* @return Found bukkit enchantment instance
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nullable
|
||||
public static Enchantment getEnchant(String key) {
|
||||
key = key.toLowerCase().replace("-", "_");
|
||||
Enchantment enchant = Enchantment.getByKey(NamespacedKey.minecraft(key));
|
||||
|
Loading…
Reference in New Issue
Block a user