this.addOutfit = addOutfit;
this.temporaryOutfit = temporaryOutfit;
}
public void fire(final Player player, final Sentence sentence, final EventRaiser npc) {
Outfit outfit = player.getOriginalOutfit();
if (outfit == null) {
outfit = player.getOutfit();
}
// Depending on if you want to add or remove part of the outfit...
if (addOutfit) {
//... either put the new outfit over the old one
// and set the players outfit to the combination
Outfit tempOutfit = this.outfitChange.putOver(outfit);
player.setOutfit(tempOutfit, temporaryOutfit);
} else {
//... or remove (parts of) the players outfit
// and set the players outfit to this combination
Outfit tempOutfit = outfit.removeOutfit(this.outfitChange);
player.setOutfit(tempOutfit, temporaryOutfit);
}
}