Revert deletion of NmsManager, deprecate it and have it use the new one

This commit is contained in:
Christian Koop 2023-05-06 22:15:15 +02:00
parent 17780fffdc
commit 5e21ac9424
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
1 changed files with 53 additions and 0 deletions

View File

@ -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();
}
}