// Remove action
final List<ChatAction> removeSheepAction = new LinkedList<ChatAction>();
removeSheepAction.add(new ChatAction() {
public void fire(Player player, Sentence sentence, EventRaiser npc) {
// remove sheep
final Sheep sheep = player.getSheep();
if(sheep != null) {
player.removeSheep(sheep);
player.notifyWorldAboutChanges();
if(npc.getEntity() instanceof SheepBuyerSpeakerNPC) {
((SheepBuyerSpeakerNPC)npc.getEntity()).moveSheep(sheep);
} else {
// only to prevent that an error occurs and the sheep does not disappear
sheep.getZone().remove(sheep);
}
} else {
// should not happen
npc.say("What? What sheep? Did I miss something?");
npc.setCurrentState(ConversationStates.IDLE);