diff --git a/api/actions/placeact.php b/api/actions/placeact.php index c2f88ee..68f9103 100644 --- a/api/actions/placeact.php +++ b/api/actions/placeact.php @@ -10,6 +10,10 @@ $player = new Player(getRequestUser()); $place = new Place($VARS["id"] * 1); +if ($player->energy->getEnergy() == 0) { + sendJsonResp($Strings->get("You don't have enough energy!", false), "ERROR"); +} + if ($place->isClaimed()) { if ($place->getTeamID() == $player->getTeamID()) { // Same teams, player is defending