Package com.gamingmesh.jobs.container

Examples of com.gamingmesh.jobs.container.JobsPlayer


        // check if in creative
        if (player.getGameMode().equals(GameMode.CREATIVE) && !ConfigManager.getJobsConfiguration().payInCreative())
            return;
       
        double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(player);
        JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
        Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT), multiplier);
    }
View Full Code Here


        // check if in creative
        if (player.getGameMode().equals(GameMode.CREATIVE) && !ConfigManager.getJobsConfiguration().payInCreative())
            return;
       
        double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(player);
        JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
        Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.REPAIR), multiplier);
    }
View Full Code Here

        // check if in creative
        if (player.getGameMode().equals(GameMode.CREATIVE) && !ConfigManager.getJobsConfiguration().payInCreative())
            return;
       
        double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(player);
        JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
        Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.ENCHANT), multiplier);
    }
View Full Code Here

       
        if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
            return;
       
        double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(player);
        JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
        Jobs.action(jPlayer, new ItemActionInfo(event.getResult(), ActionType.SMELT), multiplier);
    }
View Full Code Here

       
        if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
            return;
       
        double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(player);
        JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);
        Jobs.action(jPlayer, new ItemActionInfo(event.getContents().getIngredient(), ActionType.BREW), multiplier);
    }
View Full Code Here

                    return;
               
                // restricted area multiplier
                double multiplier = ConfigManager.getJobsConfiguration().getRestrictedMultiplier(pDamager);
                // pay
                JobsPlayer jDamager = Jobs.getPlayerManager().getJobsPlayer(pDamager);
                Jobs.action(jDamager, new EntityActionInfo(lVictim.getType(), ActionType.KILL), multiplier);
            }
        }
    }
View Full Code Here

     * Handles join of new player
     * @param playername
     */
    public void playerJoin(Player player) {
        synchronized (players) {
            JobsPlayer jPlayer = players.get(player.getName().toLowerCase());
            if (jPlayer == null) {
                jPlayer = JobsPlayer.loadFromDao(Jobs.getJobsDAO(), player);
                players.put(player.getName().toLowerCase(), jPlayer);
            }
            jPlayer.onConnect();
            jPlayer.reloadHonorific();
            Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
        }
    }
View Full Code Here

     * @param playername
     */
    public void playerQuit(Player player) {
        synchronized (players) {
            if (ConfigManager.getJobsConfiguration().saveOnDisconnect()) {
                JobsPlayer jPlayer = players.remove(player.getName().toLowerCase());
                if (jPlayer != null) {
                    jPlayer.save(Jobs.getJobsDAO());
                    jPlayer.onDisconnect();
                }
            } else {
                JobsPlayer jPlayer = players.get(player.getName().toLowerCase());
                if (jPlayer != null) {
                    jPlayer.onDisconnect();
                }
            }
        }
    }
View Full Code Here

        }
       
        synchronized (players) {
            Iterator<JobsPlayer> iter = players.values().iterator();
            while (iter.hasNext()) {
                JobsPlayer jPlayer = iter.next();
                synchronized (jPlayer.saveLock) {
                    if (!jPlayer.isOnline() && jPlayer.isSaved()) {
                        iter.remove();
                    }
                }
            }
        }
View Full Code Here

     * Get the player job info for specific player
     * @param player - the player who's job you're getting
     * @return the player job info of the player
     */
    public JobsPlayer getJobsPlayerOffline(OfflinePlayer offlinePlayer) {
        JobsPlayer jPlayer = players.get(offlinePlayer.getName().toLowerCase());
        if (jPlayer != null)
            return jPlayer;
       
        return JobsPlayer.loadFromDao(Jobs.getJobsDAO(), offlinePlayer);
    }
View Full Code Here

TOP

Related Classes of com.gamingmesh.jobs.container.JobsPlayer

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.