Package net.minecraft.util.com.mojang.authlib

Examples of net.minecraft.util.com.mojang.authlib.GameProfile


                uuid = UUID.fromString(s);
            } catch (Throwable throwable) {
                return null;
            }

            return new GameProfile(uuid, jsonobject.get("name").getAsString());
        } else {
            return null;
        }
    }
View Full Code Here


        this.k.a(false);
        this.maxPlayers = 8;
    }

    public void a(NetworkManager networkmanager, EntityPlayer entityplayer) {
        GameProfile gameprofile = entityplayer.getProfile();
        UserCache usercache = this.server.getUserCache();
        GameProfile gameprofile1 = usercache.a(gameprofile.getId());
        String s = gameprofile1 == null ? gameprofile.getName() : gameprofile1.getName();

        usercache.a(gameprofile);
        NBTTagCompound nbttagcompound = this.a(entityplayer);

        entityplayer.spawnIn(this.server.getWorldServer(entityplayer.dimension));
View Full Code Here

    }

    public void execute(ICommandListener icommandlistener, String[] astring) {
        if (astring.length >= 1 && astring[0].length() > 0) {
            MinecraftServer minecraftserver = MinecraftServer.getServer();
            GameProfile gameprofile = minecraftserver.getUserCache().getProfile(astring[0]);

            if (gameprofile == null) {
                throw new CommandException("commands.ban.failed", new Object[] { astring[0]});
            } else {
                String s = null;
View Full Code Here

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final String oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null) {
                this.gameProfileField.set(p, new GameProfile(newName.getUUID().toString().replaceAll("-", ""), newName.getName()));
            }
        }
    }
View Full Code Here

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final UUID oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null && !newName.getName().equals(oldName)) {
                int i = this.tastySnack++;
                this.gameProfileField.set(p, new GameProfile(UUID.nameUUIDFromBytes(new byte[]{(byte) (i >> 24), (byte) (i >> 16), (byte) (i >> 8), (byte) i}), newName.getName()));
            }
        }
    }
View Full Code Here

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final String oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null) {
                this.gameProfileField.set(p, new GameProfile(newName.getUUID().toString().replaceAll("-", ""), newName.getName()));
            }
        }
    }
View Full Code Here

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final UUID oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null && !newName.getName().equals(oldName)) {
                int i = this.tastySnack++;
                this.gameProfileField.set(p, new GameProfile(UUID.nameUUIDFromBytes(new byte[]{(byte) (i >> 24), (byte) (i >> 16), (byte) (i >> 8), (byte) i}), newName.getName()));
            }
        }
    }
View Full Code Here

            OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
            if (player == null) {
                return null;
            }
            GameProfile profile = new GameProfile(uuid, player.getName());
            MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
            // Create an entity to load the player data
            EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), profile, new PlayerInteractManager(server.getWorldServer(0)));

            // Get the bukkit entity
View Full Code Here

                return null;
            }

            MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();

            GameProfile profile = new GameProfile(null, playername);
            // Create an entity to load the player data
            EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), profile, new PlayerInteractManager(server.getWorldServer(0)));

            // Get the bukkit entity
            Player target = (entity == null) ? null : entity.getBukkitEntity();
View Full Code Here

                return null;
            }

            MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();

            GameProfile profile = new GameProfile(null, playername);
            // Create an entity to load the player data
            EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(0), profile, new PlayerInteractManager(server.getWorldServer(0)));

            // Get the bukkit entity
            Player target = (entity == null) ? null : entity.getBukkitEntity();
View Full Code Here

TOP

Related Classes of net.minecraft.util.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.