mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-09-28 11:51:05 +02:00
3649bdd29c
-Bugs fixed
21 lines
668 B
Java
21 lines
668 B
Java
package ellpeck.actuallyadditions.util;
|
|
|
|
import com.mojang.authlib.GameProfile;
|
|
import net.minecraft.world.World;
|
|
import net.minecraft.world.WorldServer;
|
|
import net.minecraftforge.common.util.FakePlayer;
|
|
|
|
import java.util.UUID;
|
|
|
|
public class FakePlayerUtil{
|
|
|
|
public static final String fakeName = "EllpecksActuallyAdditionsFakePlayer";
|
|
public static GameProfile fakeProfile = new GameProfile(UUID.nameUUIDFromBytes(fakeName.getBytes()), fakeName);
|
|
|
|
public static FakePlayer newFakePlayer(World world){
|
|
if(world instanceof WorldServer){
|
|
return new FakePlayer((WorldServer)world, fakeProfile);
|
|
}
|
|
else return null;
|
|
}
|
|
}
|