/** * Perform an action. * * @param at The action. */ @Override public void onAction(final ActionType at) { if (isReleased()) { return; } switch (at) { case USE: case KNOCK: at.send(at.fillTargetInfo(entity)); break; default: super.onAction(at); break; } }
/** * Build a list of entity specific actions. <strong>NOTE: The first entry should be the * default.</strong> * * @param list The list to populate. */ @Override protected void buildActions(final List<String> list) { super.buildActions(list); list.add(ActionType.USE.getRepresentation()); list.add(ActionType.KNOCK.getRepresentation()); }