Package org.bukkit

Examples of org.bukkit.OfflinePlayer


        }
    }

    @Override
    public boolean playerHas(String world, String player, String permission) {
        OfflinePlayer op = Bukkit.getOfflinePlayer(player);

        if (op.isOnline()) {
            Player p = (Player) op;
            if (p.getWorld().getName().equalsIgnoreCase(world)) {
                return p.hasPermission(permission);
            }
        }
View Full Code Here


        return user.hasPermission(permission, true);
    }

    @Override
    public boolean playerInGroup(String world, String player, String group) {
        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
View Full Code Here

        }
    }

    @Override
    public boolean playerRemove(String world, String player, String permission) {
        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        boolean value = !permission.startsWith("^");
        permission = value ? permission : permission.substring(1);
View Full Code Here

        }
    }

    @Override
    public boolean playerRemoveGroup(String world, String player, String group) {
        OfflinePlayer op = Bukkit.getOfflinePlayer(player);
        GroupSet set = perms.getGroupManager().getWorldSet(Bukkit.getWorld(world));
        User user = set.getUser(op);

        if (set.hasGroup(group)) {
            Group g = set.getGroup(group);
View Full Code Here

        return hasAccount(playerName, worlds.get(0).getName());
    }

    @Override
    public boolean hasAccount(String playerName, String worldName) {
        OfflinePlayer player = plugin.getServer().getOfflinePlayer(playerName);
        World world = plugin.getServer().getWorld(worldName);
       
        return economy.isAccountCreated(player, world);
    }
View Full Code Here

        return getBalance(playerName, worlds.get(0).getName());
    }

    @Override
    public double getBalance(String playerName, String worldName) {  
        OfflinePlayer player = plugin.getServer().getOfflinePlayer(playerName);
        World world = plugin.getServer().getWorld(worldName);
       
        return economy.getAccountBalance(player, world);
    }
View Full Code Here

        return has(playerName, worlds.get(0).getName(), amount);
    }

    @Override
    public boolean has(String playerName, String worldName, double amount) {
        OfflinePlayer player = plugin.getServer().getOfflinePlayer(playerName);
        World world = plugin.getServer().getWorld(worldName);
       
        double playerBalance = economy.getAccountBalance(player, world);
       
        if(playerBalance >= amount) {
View Full Code Here

        return withdrawPlayer(playerName, worlds.get(0).getName(), amount);
    }

    @Override
    public EconomyResponse withdrawPlayer(String playerName, String worldName, double amount) {
        OfflinePlayer player = plugin.getServer().getOfflinePlayer(playerName);
        World world = plugin.getServer().getWorld(worldName);
       
        double balance = economy.getAccountBalance(player, world);
       
        if(getBalance(playerName, worldName) < amount) {
View Full Code Here

        return depositPlayer(playerName, worlds.get(0).getName(), amount);
    }

    @Override
    public EconomyResponse depositPlayer(String playerName, String worldName, double amount) {
        OfflinePlayer player = plugin.getServer().getOfflinePlayer(playerName);
        World world = plugin.getServer().getWorld(worldName);
       
        double balance = economy.getAccountBalance(player, world);
       
        if(economy.addAccountBalance(player, amount, world)) {
View Full Code Here

        }
    }

    @Override
    public EconomyResponse createBank(String name, String player) {
        OfflinePlayer owner = plugin.getServer().getOfflinePlayer(player);
       
        ArrayList<OfflinePlayer> owners = new ArrayList<OfflinePlayer>();
        owners.add(owner);
       
        if(!economy.isBankCreated(name)) {
View Full Code Here

TOP

Related Classes of org.bukkit.OfflinePlayer

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.