}
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 {