From 95e3d5fef4b4a5f6d370165af3ccce60841b3651 Mon Sep 17 00:00:00 2001 From: Jules Date: Sat, 10 Feb 2024 23:51:01 +0100 Subject: [PATCH] Fixed default config --- .../src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java | 2 +- MMOItems-Dist/src/main/resources/config.yml | 1 - MMOItems-Dist/src/main/resources/default/item/gauntlet.yml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java index 7387f8b0..f6eab30e 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/listener/ItemUse.java @@ -106,7 +106,7 @@ public class ItemUse implements Listener { final ItemStack weaponUsed = player.getInventory().getItem(((MeleeAttackMetadata) event.getAttack()).getHand().toBukkit()); final NBTItem item = MythicLib.plugin.getVersion().getWrapper().getNBTItem(weaponUsed); final Type itemType = Type.get(item); - if (itemType == Type.BLOCK) return; + if (itemType == null || itemType == Type.BLOCK) return; // Prevent melee attacks with non-melee weapons if (!itemType.hasMeleeAttacks()) { diff --git a/MMOItems-Dist/src/main/resources/config.yml b/MMOItems-Dist/src/main/resources/config.yml index 0a608ce3..4bc66af0 100644 --- a/MMOItems-Dist/src/main/resources/config.yml +++ b/MMOItems-Dist/src/main/resources/config.yml @@ -65,7 +65,6 @@ default-item-capacity: default: attack-speed: 0.67 range: 16 - blunt-rating: 33 recoil: 0.1 # Restart server when changing this option diff --git a/MMOItems-Dist/src/main/resources/default/item/gauntlet.yml b/MMOItems-Dist/src/main/resources/default/item/gauntlet.yml index 4bb237aa..ca6c961c 100644 --- a/MMOItems-Dist/src/main/resources/default/item/gauntlet.yml +++ b/MMOItems-Dist/src/main/resources/default/item/gauntlet.yml @@ -1,6 +1,6 @@ FIGHTING_GAUNTLETS: base: - material: IRON_HORSE_ARMOR + material: IRON_SHOVEL lore: - §7Tired of breaking your bones when - §7doing hand-to-hand combat?