try
{
if((castle != null) && (targets[0] instanceof L2ArtefactInstance))
castle.Engrave(player.getClan(), targets[0].getObjectId());
else if(fort != null)
fort.EndOfSiege(player.getClan());
}
catch(Exception e)
{
if(Config.ENABLE_ALL_EXCEPTIONS)
e.printStackTrace();