{
if (!canBypassCheck(player, this))
{
return;
}
ClanHall clanHall = getClanHall();
if (command.equalsIgnoreCase("openDoors"))
{
if (player.hasPrivilege(Privilege.CH_ENTER_EXIT) && (player.getClan().getHasHideout() == clanHall.getId()))
{
for (int d : _doors)
{
ReflectionUtils.getDoor(d).openMe();
}
showChatWindow(player, "residence2/clanhall/agitafterdooropen.htm");
}
else
{
showChatWindow(player, "residence2/clanhall/noAuthority.htm");
}
}
else if (command.equalsIgnoreCase("closeDoors"))
{
if (player.hasPrivilege(Privilege.CH_ENTER_EXIT) && (player.getClan().getHasHideout() == clanHall.getId()))
{
for (int d : _doors)
{
ReflectionUtils.getDoor(d).closeMe(player, true);
}
showChatWindow(player, "residence2/clanhall/agitafterdoorclose.htm");
}
else
{
showChatWindow(player, "residence2/clanhall/noAuthority.htm");
}
}
else if (command.equalsIgnoreCase("banish"))
{
if (player.hasPrivilege(Privilege.CH_DISMISS))
{
clanHall.banishForeigner();
showChatWindow(player, "residence2/clanhall/agitafterbanish.htm");
}
else
{
showChatWindow(player, "residence2/clanhall/noAuthority.htm");