default:
// we switch over an enum
break;
}
new GameEvent(player.getName(), ALTER, action.get(TARGET), stat, Integer.toString(numberValue)).raise();
changed.put(stat, numberValue);
} else {
// If value is not a number, only SET and UNSET can be used
if (mode.equalsIgnoreCase(SET)) {
new GameEvent(player.getName(), ALTER, action.get(TARGET), stat, action.get(VALUE)).raise();
changed.put(stat, action.get(VALUE));
} else if (mode.equalsIgnoreCase(UNSET)) {
if (type.getType() != Type.FLAG) {
player.sendPrivateText("Attribute to be unset is not of type 'flag'.");
return;
}
new GameEvent(player.getName(), ALTER, action.get(TARGET), stat, "unset").raise();
changed.remove(stat);
}
}
changed.update();