Package com.bekvon.bukkit.residence.protection

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


                    return;
                }
            }
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getBlockClicked().getLocation(), player);
        if (!perms.playerHas(pname, player.getWorld().getName(), "bucket", perms.playerHas(pname, player.getWorld().getName(), "build", true))) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "bucket"));
            event.setCancelled(true);
        }
    }
View Full Code Here


                    return;
                }
            }
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getBlockClicked().getLocation(), player);
        if (!perms.playerHas(pname, player.getWorld().getName(), "bucket", perms.playerHas(pname, player.getWorld().getName(), "build", true))) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "bucket"));
            event.setCancelled(true);
        }
    }
View Full Code Here

                    return;
                }
            }
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getBlockClicked().getLocation(), player);
        boolean hasbucket = perms.playerHas(pname, player.getWorld().getName(), "bucket", perms.playerHas(pname, player.getWorld().getName(), "build", true));
        if (!hasbucket) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "bucket"));
            event.setCancelled(true);
        }
    }
View Full Code Here

                    return;
                }
            }
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getBlockClicked().getLocation(), player);
        boolean hasbucket = perms.playerHas(pname, player.getWorld().getName(), "bucket", perms.playerHas(pname, player.getWorld().getName(), "build", true));
        if (!hasbucket) {
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("FlagDeny", "bucket"));
            event.setCancelled(true);
        }
    }
View Full Code Here

            return;
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getEntity().getLocation(), player);
        String pname = player.getName();
        String world = player.getWorld().getName();
        if (!perms.playerHas(pname, world, "place", perms.playerHas(pname, world, "build", true))) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
        }
    }
View Full Code Here

            return;
        }
        FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getEntity().getLocation(), player);
        String pname = player.getName();
        String world = player.getWorld().getName();
        if (!perms.playerHas(pname, world, "place", perms.playerHas(pname, world, "build", true))) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
        }
    }
View Full Code Here

                    return;
                }
                String pname = player.getName();
                FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getEntity().getLocation(), player);
                String world = event.getEntity().getWorld().getName();
                if (!perms.playerHas(pname, world, "destroy", perms.playerHas(pname, world, "build", true))) {
                    event.setCancelled(true);
                    player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
                }
            }
        }
View Full Code Here

                    return;
                }
                String pname = player.getName();
                FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getEntity().getLocation(), player);
                String world = event.getEntity().getWorld().getName();
                if (!perms.playerHas(pname, world, "destroy", perms.playerHas(pname, world, "build", true))) {
                    event.setCancelled(true);
                    player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
                }
            }
        }
View Full Code Here

        if (res != null) {
            if (res.getItemIgnoreList().isListed(mat)) {
                return;
            }
        }
        boolean hasdestroy = perms.playerHas(pname, player.getWorld().getName(), "destroy", perms.playerHas(pname, player.getWorld().getName(), "build", true));
        boolean hasContainer = perms.playerHas(pname, player.getWorld().getName(), "container", true);
        if (!hasdestroy || (!hasContainer && mat == Material.CHEST)) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
            return;
View Full Code Here

        if (res != null) {
            if (res.getItemIgnoreList().isListed(mat)) {
                return;
            }
        }
        boolean hasdestroy = perms.playerHas(pname, player.getWorld().getName(), "destroy", perms.playerHas(pname, player.getWorld().getName(), "build", true));
        boolean hasContainer = perms.playerHas(pname, player.getWorld().getName(), "container", true);
        if (!hasdestroy || (!hasContainer && mat == Material.CHEST)) {
            event.setCancelled(true);
            player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
            return;
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.