Replace deprecated usages of NmsManager with Nms

This commit is contained in:
Christian Koop 2023-08-15 18:58:04 +02:00
parent 2caf39d49e
commit a259589897
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ package com.craftaro.skyblock.utils.structure;
import com.craftaro.core.compatibility.CompatibleMaterial;
import com.craftaro.core.compatibility.ServerVersion;
import com.craftaro.core.nms.NmsManager;
import com.craftaro.core.nms.Nms;
import com.craftaro.core.nms.nbt.NBTEntity;
import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial;
import com.craftaro.skyblock.SkyBlock;
@ -196,7 +196,7 @@ public final class StructureUtil {
org.bukkit.Location blockLocation = new org.bukkit.Location(location.getWorld(), location.getX() - Math.abs(Integer.parseInt(storage.getOriginLocation().split(":")[0])),
location.getY() - Integer.parseInt(storage.getOriginLocation().split(":")[1]), location.getZ() + Math.abs(Integer.parseInt(storage.getOriginLocation().split(":")[2])));
blockLocation.add(blockRotationLocation);
NBTEntity nbtEntity = NmsManager.getNbt().newEntity();
NBTEntity nbtEntity = Nms.getImplementations().getNbt().newEntity();
nbtEntity.deSerialize(entityDataList.getSerializedNBT());
nbtEntity.set("UUID", UUID.randomUUID());
nbtEntity.spawn(blockLocation);

View File

@ -2,7 +2,7 @@ package com.craftaro.skyblock.utils.world.entity;
import com.craftaro.core.compatibility.CompatibleMaterial;
import com.craftaro.core.compatibility.ServerVersion;
import com.craftaro.core.nms.NmsManager;
import com.craftaro.core.nms.Nms;
import com.craftaro.skyblock.utils.item.ItemStackUtil;
import org.bukkit.Art;
import org.bukkit.Bukkit;
@ -51,7 +51,7 @@ import java.util.List;
@SuppressWarnings("deprecation")
public final class EntityUtil {
public static EntityData convertEntityToEntityData(Entity entity, int x, int y, int z) {
return new EntityData(NmsManager.getNbt().of(entity).serialize("Attributes"), x, y, z);
return new EntityData(Nms.getImplementations().getNbt().of(entity).serialize("Attributes"), x, y, z);
}
public static void convertEntityDataToEntity(EntityData entityData, Location loc) {