Fixed Fake Player

This commit is contained in:
Ellpeck 2015-12-23 23:14:39 +01:00
parent 732da75c9f
commit 583d6e025e

View file

@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfile;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.FakePlayerFactory;
import java.util.UUID;
@ -29,8 +30,8 @@ public class FakePlayerUtil{
public static FakePlayer getFakePlayer(World world){
if(world instanceof WorldServer){
if(theFakePlayer == null || theFakePlayer.worldObj != world){
theFakePlayer = new FakePlayer((WorldServer)world, FAKE_PROFILE);
if(theFakePlayer == null){
theFakePlayer = FakePlayerFactory.get((WorldServer)world, FAKE_PROFILE);
}
return theFakePlayer;
}