Examples of playerHas()


Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

        String world = player.getWorld().getName();
        String permgroup = Residence.getPermissionManager().getGroupNameByPlayer(player);
        boolean resadmin = Residence.isResAdminOn(player);
        if (event.getAction() == Action.PHYSICAL) {
            if (!resadmin) {
                boolean hasuse = perms.playerHas(player.getName(), world, "use", true);
                boolean haspressure = perms.playerHas(player.getName(), world, "pressure", hasuse);
                if ((!hasuse && !haspressure || !haspressure) && (mat == Material.STONE_PLATE || mat == Material.WOOD_PLATE)) {
                    event.setCancelled(true);
                    return;
                }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

        String permgroup = Residence.getPermissionManager().getGroupNameByPlayer(player);
        boolean resadmin = Residence.isResAdminOn(player);
        if (event.getAction() == Action.PHYSICAL) {
            if (!resadmin) {
                boolean hasuse = perms.playerHas(player.getName(), world, "use", true);
                boolean haspressure = perms.playerHas(player.getName(), world, "pressure", hasuse);
                if ((!hasuse && !haspressure || !haspressure) && (mat == Material.STONE_PLATE || mat == Material.WOOD_PLATE)) {
                    event.setCancelled(true);
                    return;
                }
            }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                if ((!hasuse && !haspressure || !haspressure) && (mat == Material.STONE_PLATE || mat == Material.WOOD_PLATE)) {
                    event.setCancelled(true);
                    return;
                }
            }
            if (!perms.playerHas(player.getName(), world, "trample", perms.playerHas(player.getName(), world, "build", true)) && (mat == Material.SOIL || mat == Material.SOUL_SAND)) {
                event.setCancelled(true);
                return;
            }
            return;
        }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                if ((!hasuse && !haspressure || !haspressure) && (mat == Material.STONE_PLATE || mat == Material.WOOD_PLATE)) {
                    event.setCancelled(true);
                    return;
                }
            }
            if (!perms.playerHas(player.getName(), world, "trample", perms.playerHas(player.getName(), world, "build", true)) && (mat == Material.SOIL || mat == Material.SOUL_SAND)) {
                event.setCancelled(true);
                return;
            }
            return;
        }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                if (player.getItemInHand() != null) {
                    if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
                        if (player.getItemInHand().getTypeId() == 351) {
                            if (player.getItemInHand().getData().getData() == 15 && block.getType() == Material.GRASS || player.getItemInHand().getData().getData() == 3 && block.getTypeId() == 17 && (block.getData() == 3 || block.getData() == 7 || block.getData() == 11 || block.getData() == 15)) {
                                perms = Residence.getPermsByLocForPlayer(block.getRelative(event.getBlockFace()).getLocation(), player);
                                if (!perms.playerHas(player.getName(), world, "build", true)) {
                                    event.setCancelled(true);
                                    return;
                                }
                                return;
                            }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                            }
                        }
                    }
                }
                if (isContainer(mat, block) || isCanUseEntity(mat, block)) {
                    boolean hasuse = perms.playerHas(player.getName(), world, "use", true);
                    for (Entry<Material, String> checkMat : FlagPermissions.getMaterialUseFlagList().entrySet()) {
                        if (mat == checkMat.getKey()) {
                            if (!perms.playerHas(player.getName(), world, checkMat.getValue(), hasuse)) {
                                if (hasuse || checkMat.getValue().equals("container")) {
                                    event.setCancelled(true);
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                }
                if (isContainer(mat, block) || isCanUseEntity(mat, block)) {
                    boolean hasuse = perms.playerHas(player.getName(), world, "use", true);
                    for (Entry<Material, String> checkMat : FlagPermissions.getMaterialUseFlagList().entrySet()) {
                        if (mat == checkMat.getKey()) {
                            if (!perms.playerHas(player.getName(), world, checkMat.getValue(), hasuse)) {
                                if (hasuse || checkMat.getValue().equals("container")) {
                                    event.setCancelled(true);
                                    player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", checkMat.getValue()));
                                    return;
                                } else {
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

                                }
                            }
                        }
                    }
                    if (Residence.getConfigManager().getCustomContainers().contains(Integer.valueOf(block.getTypeId()))) {
                        if (!perms.playerHas(player.getName(), world, "container", hasuse)) {
                            event.setCancelled(true);
                            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "container"));
                            return;
                        }
                    }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

        if (!Residence.getItemManager().isAllowed(heldItem, permgroup, world)) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("ItemBlacklisted"));
            event.setCancelled(true);
            return;
        }
        if (!perms.playerHas(player.getName(), world, "container", perms.playerHas(player.getName(), world, "use", true))) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "container"));
        }
    }
View Full Code Here

Examples of com.bekvon.bukkit.residence.protection.FlagPermissions.playerHas()

        if (!Residence.getItemManager().isAllowed(heldItem, permgroup, world)) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("ItemBlacklisted"));
            event.setCancelled(true);
            return;
        }
        if (!perms.playerHas(player.getName(), world, "container", perms.playerHas(player.getName(), world, "use", true))) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "container"));
        }
    }
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.