mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
Merge branch 'master' into fork/Boy0000/nms-packets
This commit is contained in:
@@ -150,7 +150,9 @@ public class ItemSerializer implements TypeSerializer<ItemStack> {
|
||||
|
||||
|
||||
if (!itemFlagsNode.virtual()) {
|
||||
itemMeta.setAttributeModifiers(item.getType().getDefaultAttributeModifiers());
|
||||
if (HibiscusCommonsPlugin.isOnPaper() && NMSHandlers.getVersion().isHigherOrEqual(MinecraftVersion.v1_20_6)) {
|
||||
itemMeta.setAttributeModifiers(item.getType().getDefaultAttributeModifiers());
|
||||
}
|
||||
for (String itemFlag : itemFlagsNode.getList(String.class)) {
|
||||
if (!EnumUtils.isValidEnum(ItemFlag.class, itemFlag)) continue;
|
||||
//MessagesUtil.sendDebugMessages("Added " + itemFlag + " to the item!");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package me.lojosho.hibiscuscommons.hooks;
|
||||
|
||||
import lombok.Getter;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import me.lojosho.hibiscuscommons.HibiscusCommonsPlugin;
|
||||
@@ -44,6 +45,7 @@ public class Hooks {
|
||||
private static final HookPremiumVanish PREMIUM_VANISH_HOOK = new HookPremiumVanish();
|
||||
private static final HookSuperVanish SUPER_VANISH_HOOK = new HookSuperVanish();
|
||||
|
||||
@Getter
|
||||
private static boolean allHooksActive = false;
|
||||
|
||||
public static Hook getHook(@NotNull String id) {
|
||||
|
||||
@@ -10,6 +10,7 @@ public enum MinecraftVersion {
|
||||
v1_21_3,
|
||||
v1_21_4,
|
||||
v1_21_5,
|
||||
v1_21_6,
|
||||
;
|
||||
|
||||
public boolean isHigher(MinecraftVersion other) {
|
||||
|
||||
@@ -19,6 +19,7 @@ public class NMSHandlers {
|
||||
put(MinecraftVersion.v1_21_3, "v1_21_R2");
|
||||
put(MinecraftVersion.v1_21_4, "v1_21_R3");
|
||||
put(MinecraftVersion.v1_21_5, "v1_21_R4");
|
||||
put(MinecraftVersion.v1_21_6, "v1_21_R5");
|
||||
}};
|
||||
|
||||
private static NMSHandler handler;
|
||||
|
||||
Reference in New Issue
Block a user