Package net.minecraftforge.common.util
Class FakePlayerFactory
- java.lang.Object
-
- net.minecraftforge.common.util.FakePlayerFactory
-
public class FakePlayerFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<com.mojang.authlib.GameProfile,FakePlayer>
fakePlayers
private static com.mojang.authlib.GameProfile
MINECRAFT
private static java.lang.ref.WeakReference<FakePlayer>
MINECRAFT_PLAYER
-
Constructor Summary
Constructors Constructor Description FakePlayerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FakePlayer
get(ServerWorld world, com.mojang.authlib.GameProfile username)
Get a fake player with a given username, Mods should either hold weak references to the return value, or listen for a WorldEvent.Unload and kill all references to prevent worlds staying in memory.static FakePlayer
getMinecraft(ServerWorld world)
static void
unloadWorld(ServerWorld world)
-
-
-
Field Detail
-
MINECRAFT
private static com.mojang.authlib.GameProfile MINECRAFT
-
fakePlayers
private static java.util.Map<com.mojang.authlib.GameProfile,FakePlayer> fakePlayers
-
MINECRAFT_PLAYER
private static java.lang.ref.WeakReference<FakePlayer> MINECRAFT_PLAYER
-
-
Method Detail
-
getMinecraft
public static FakePlayer getMinecraft(ServerWorld world)
-
get
public static FakePlayer get(ServerWorld world, com.mojang.authlib.GameProfile username)
Get a fake player with a given username, Mods should either hold weak references to the return value, or listen for a WorldEvent.Unload and kill all references to prevent worlds staying in memory.
-
unloadWorld
public static void unloadWorld(ServerWorld world)
-
-