Examples of PlayerProfile


Examples of net.citizensnpcs.questers.data.PlayerProfile

    @CommandRequirements()
    @Command(aliases = "quest", usage = "abort", desc = "aborts current quest", modifiers = "abort", min = 1, max = 1)
    @CommandPermissions("quester.use.quests.abort")
    public static void abortCurrentQuest(CommandContext args, Player player, HumanNPC npc) {
        PlayerProfile profile = PlayerProfile.getProfile(player.getName());
        if (!profile.hasQuest()) {
            player.sendMessage(ChatColor.GRAY + "You don't have a quest at the moment.");
        } else {
            Bukkit.getPluginManager().callEvent(
                    new QuestCancelEvent(QuestManager.getQuest(profile.getProgress().getQuestName()), player));
            List<Reward> abort = QuestManager.getQuest(profile.getQuest()).getAbortRewards();
            if (abort != null) {
                for (Reward reward : abort)
                    reward.grant(player, profile.getProgress().getQuesterUID());
            }
            profile.setProgress(null);
            player.sendMessage(ChatColor.GREEN + "Quest cleared.");
        }
    }
View Full Code Here

Examples of net.glowstone.entity.meta.profile.PlayerProfile

     * Get a spoofed profile to use with the given name.
     * @param name The player name.
     * @return The spoofed profile.
     */
    public PlayerProfile getProfile(String name) {
        return new PlayerProfile(name, uuid, properties);
    }
View Full Code Here

Examples of net.glowstone.entity.meta.profile.PlayerProfile

        return (hasOwner() ? owner.getName() : null);
    }

    @Override
    public boolean setOwner(String name) {
        PlayerProfile owner = PlayerProfile.getProfile(name);
        if (owner == null) {
            return false;
        }
        this.owner = owner;
        this.setSkullType(SkullType.PLAYER);
View Full Code Here

Examples of net.glowstone.entity.meta.profile.PlayerProfile

        return owner != null;
    }

    @Override
    public boolean setOwner(String name) {
        PlayerProfile owner = PlayerProfile.getProfile(name);
        if (owner == null) {
            return false;
        }
        this.owner = owner;
        return true;
View Full Code Here

Examples of net.glowstone.entity.meta.profile.PlayerProfile

            session.send(new EncryptionKeyRequestMessage(sessionId, publicKey, verifyToken));
        } else {
            ProxyData proxy = session.getProxyData();
            if (proxy == null) {
                UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8));
                session.setPlayer(new PlayerProfile(name, uuid));
            } else {
                session.setPlayer(proxy.getProfile(name));
            }
        }
    }
View Full Code Here

Examples of net.glowstone.entity.meta.profile.PlayerProfile

                // spawn player
                session.getServer().getScheduler().runTask(null, new Runnable() {
                    @Override
                    public void run() {
                        session.setPlayer(new PlayerProfile(name, uuid, properties));
                    }
                });
            } catch (Exception e) {
                GlowServer.logger.log(Level.SEVERE, "Error in authentication thread", e);
                session.disconnect("Internal error during authentication.", true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.