mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-13 05:53:57 +01:00
Replace deprecated usages of NmsManager with Nms
This commit is contained in:
parent
2caf39d49e
commit
a259589897
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user