This commit is contained in:
Anuken
2020-07-19 21:34:31 -04:00
parent 6547a38567
commit 7a2a436a52
2 changed files with 4 additions and 1 deletions

View File

@@ -139,6 +139,9 @@ public class Administration{
/** @return whether this action is allowed by the action filters. */
public boolean allowAction(Player player, ActionType type, Tile tile, Cons<PlayerAction> setter){
//some actions are done by the server (null player) and thus are always alloed
if(player == null) return true;
PlayerAction act = Pools.obtain(PlayerAction.class, PlayerAction::new);
setter.get(act.set(player, type, tile));
for(ActionFilter filter : actionFilters){