public boolean setPlayerFlag(Player player, String targetPlayer, String flag, String flagstate, boolean resadmin) {
if(validFlagGroups.containsKey(flag))
return this.setFlagGroupOnPlayer(player, targetPlayer, flag, flagstate, resadmin);
FlagState state = FlagPermissions.stringToFlagState(flagstate);
if (checkCanSetFlag(player, flag, state, false, resadmin)) {
ResidenceFlagChangeEvent fc = new ResidenceFlagChangeEvent(residence, player, flag, ResidenceFlagChangeEvent.FlagType.PLAYER, state, targetPlayer);
Residence.getServ().getPluginManager().callEvent(fc);
if (fc.isCancelled())
return false;
if(super.setPlayerFlag(targetPlayer, flag, state))
{
player.sendMessage(ChatColor.GREEN+Residence.getLanguage().getPhrase("FlagSet"));
return true;