This commit is contained in:
nulli0n committed 2024-12-08 03:31:21 +05:00
1 parent 2dae3ced49
commit cd337d7670
3 files changed
+2 -4

No files matched your search

@@ -52,7 +52,7 @@ public class ItemUtil {
}
public static void hideAttributes(@NotNull ItemMeta meta, @NotNull Material material) {
if (Version.isAtLeast(Version.MC_1_20_6)) {
if (Version.isAtLeast(Version.MC_1_20_6) && material.isItem()) {
EquipmentSlot slot = material.getEquipmentSlot();
material.getDefaultAttributeModifiers(slot).forEach((attribute, modifier) -> {
if (meta.getAttributeModifiers(attribute) == null) {
@@ -250,8 +250,6 @@ public class NightMeta implements Writeable {
}
public void apply(@NotNull ItemStack itemStack, boolean legacy) {
if (this.skinURL != null) ItemUtil.setHeadSkin(itemStack, this.skinURL);
ItemUtil.editMeta(itemStack, meta -> {
if (this.displayName != null) {
String name = this.replacer == null ? this.displayName : this.replacer.apply(this.displayName);
@@ -25,7 +25,7 @@ public class NightSound implements Writeable {
private final float pitch;
public NightSound(@NotNull String name, @Nullable Sound bukkit, float volume, float pitch) {
this.name = name;
this.name = name.toLowerCase();
this.bukkit = bukkit;
this.volume = NumberUtil.clamp(volume, MIN_VOLUME, MAX_VOLUME);