Class FakePlayerFactory


  • public class FakePlayerFactory
    extends java.lang.Object
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • FakePlayerFactory

        public FakePlayerFactory()
    • Method Detail

      • 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)