#1378: Add methods to convert between an entity and a SNBT string

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 760899464e
commit 85591014c5
4 changed files with 66 additions and 0 deletions

View File

@@ -157,6 +157,7 @@ import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
import org.bukkit.craftbukkit.command.BukkitCommandWrapper;
import org.bukkit.craftbukkit.command.CraftCommandMap;
import org.bukkit.craftbukkit.command.VanillaCommandWrapper;
import org.bukkit.craftbukkit.entity.CraftEntityFactory;
import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.craftbukkit.generator.CraftWorldInfo;
@@ -305,6 +306,7 @@ public final class CraftServer implements Server {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
CraftItemFactory.instance();
CraftEntityFactory.instance();
}
public CraftServer(DedicatedServer console, PlayerList playerList) {
@@ -2179,6 +2181,11 @@ public final class CraftServer implements Server {
return CraftItemFactory.instance();
}
@Override
public CraftEntityFactory getEntityFactory() {
return CraftEntityFactory.instance();
}
@Override
public CraftScoreboardManager getScoreboardManager() {
return scoreboardManager;