mirror of
https://github.com/darksaid98/nightcore-spigot.git
synced 2026-12-01 14:38:47 +00:00
v2.7.3
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user