Package com.mojang.authlib

Examples of com.mojang.authlib.GameProfile


@SideOnly(Side.CLIENT)
public class ClientArmorStandPlayer extends AbstractClientPlayer {
 
  public ClientArmorStandPlayer(World world) {
    super(world, new GameProfile(null, "[ARMOR STAND]"));
    setInvisible(true);
  }
View Full Code Here


    return getUsernameByUuid(UUID.fromString(uuid));
  }

  public static String getUsernameByUuid(UUID uuid)
  {
    GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152652_a(uuid);
    if (profile == null)
      return null;
    return profile.getName();
  }
View Full Code Here

    statistics.add(String.format("Treekeeping statistics for %s on %s:", player, DateFormat.getInstance().format(new Date())));
    statistics.add("");
    statistics.add("MODE: " + PluginArboriculture.treeInterface.getTreekeepingMode(world).getName());
    statistics.add("");

    GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(player);
    IArboristTracker tracker = PluginArboriculture.treeInterface.getBreedingTracker(world, profile);
    if (tracker == null)
      statistics.add("No statistics found.");
    else {
      statistics.add("BRED:");
View Full Code Here

    statistics.add(String.format("Beekeeping statistics for %s on %s:", player, DateFormat.getInstance().format(new Date())));
    statistics.add("");
    statistics.add("MODE: " + PluginApiculture.beeInterface.getBeekeepingMode(world).getName());
    statistics.add("");

    GameProfile profile = MinecraftServer.getServer().func_152358_ax().func_152655_a(player);
    IApiaristTracker tracker = PluginApiculture.beeInterface.getBreedingTracker(world, profile);
    if (tracker == null)
      statistics.add("No statistics found.");
    else {
      statistics.add("BRED:");
View Full Code Here

    String typeName = packet.payload.stringPayload[1];

    EnumAddressee type = EnumAddressee.fromString(typeName);
    IMailAddress recipient;
    if (type == EnumAddressee.PLAYER) {
      GameProfile gameProfile = MinecraftServer.getServer().func_152358_ax().func_152655_a(recipientName);
      if (gameProfile == null)
        gameProfile = new GameProfile(new UUID(0, 0), recipientName);
      recipient = PostManager.postRegistry.getMailAddress(gameProfile);
    } else if (type == EnumAddressee.TRADER) {
      recipient = PostManager.postRegistry.getMailAddress(recipientName);
    } else {
      return;
View Full Code Here

        data.writeShort(-1);
        return;
      }
      data.writeShort(0);

      GameProfile profile = address.getPlayerProfile();

      data.writeLong(profile.getId().getMostSignificantBits());
      data.writeLong(profile.getId().getLeastSignificantBits());
      data.writeUTF(profile.getName());

    } else if (type == EnumAddressee.TRADER) {

      if (tradeInfo == null) {
        data.writeShort(-1);
View Full Code Here

    type = EnumAddressee.fromString(data.readUTF());

    if (type == EnumAddressee.PLAYER) {
      if (data.readShort() < 0)
        return;
      GameProfile player = new GameProfile(new UUID(data.readLong(), data.readLong()), data.readUTF());
      this.address = PostManager.postRegistry.getMailAddress(player);

    } else if (type == EnumAddressee.TRADER) {
      if (data.readShort() < 0)
        return;
      IMailAddress address = PostManager.postRegistry.getMailAddress(data.readUTF());
      GameProfile owner = new GameProfile(new UUID(data.readLong(), data.readLong()), data.readUTF());
      ItemStack tradegood;
      ItemStack[] required;

      tradegood = readItemStack(data);
      required = new ItemStack[data.readShort()];
View Full Code Here

  public MailAddress(String name) {
    if (name == null)
      throw new IllegalArgumentException("name must not be null");

    this.type = EnumAddressee.TRADER;
    this.gameProfile = new GameProfile(new UUID(0, 0), name);
  }
View Full Code Here

  public MailAddress(IMailAddress address) {
    this.type = address.getType();
    if (type == EnumAddressee.TRADER) {
      String name = address.getName();
      this.gameProfile = new GameProfile(new UUID(0, 0), name);
    } else if (type == EnumAddressee.PLAYER) {
      this.gameProfile = address.getPlayerProfile();
    }
  }
View Full Code Here

    if (!stack.hasTagCompound())
      return false;
    ITree tree = getTree(stack);
    if (tree == null)
      return false;
    GameProfile owner = player.getGameProfile();
    return PluginArboriculture.treeInterface.setLeaves(world, tree, owner, x, y, z, true);
  }
View Full Code Here

TOP

Related Classes of com.mojang.authlib.GameProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.