From 5e21ac9424918832c7718392a47d47e101673a60 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sat, 6 May 2023 22:15:15 +0200 Subject: [PATCH] Revert deletion of NmsManager, deprecate it and have it use the new one --- .../java/com/songoda/core/nms/NmsManager.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Core/src/main/java/com/songoda/core/nms/NmsManager.java diff --git a/Core/src/main/java/com/songoda/core/nms/NmsManager.java b/Core/src/main/java/com/songoda/core/nms/NmsManager.java new file mode 100644 index 00000000..ea81c461 --- /dev/null +++ b/Core/src/main/java/com/songoda/core/nms/NmsManager.java @@ -0,0 +1,53 @@ +package com.songoda.core.nms; + +import com.songoda.core.nms.anvil.AnvilCore; +import com.songoda.core.nms.entity.NMSPlayer; +import com.songoda.core.nms.nbt.NBTCore; +import com.songoda.core.nms.world.NmsWorldBorder; +import com.songoda.core.nms.world.WorldCore; + +/** + * @deprecated Use {@link Nms} instead. + */ +@Deprecated +public class NmsManager { + @Deprecated + public static NMSPlayer getPlayer() { + return Nms.getImplementations().getPlayer(); + } + + @Deprecated + public static AnvilCore getAnvil() { + return Nms.getImplementations().getAnvil(); + } + + @Deprecated + public static boolean hasAnvil() { + return getAnvil() != null; + } + + @Deprecated + public static NBTCore getNbt() { + return Nms.getImplementations().getNbt(); + } + + @Deprecated + public static boolean hasNbt() { + return getNbt() != null; + } + + @Deprecated + public static WorldCore getWorld() { + return Nms.getImplementations().getWorld(); + } + + @Deprecated + public static boolean hasWorld() { + return getWorld() != null; + } + + @Deprecated + public static NmsWorldBorder getWorldBorder() { + return Nms.getImplementations().getWorldBorder(); + } +}