Skip to content

Commit

Permalink
More APIs for EconomyLand
Browse files Browse the repository at this point in the history
  • Loading branch information
onebone committed Aug 4, 2015
1 parent 3b7ccaf commit ac4564c
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion EconomyLand/src/onebone/economyland/EconomyLand.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,19 @@ public function permissionCheck(Event $event){
return true;
}

/**
* Adds land to the EconomyLand database
*
* @var Player|string $player
* @var int $startX
* @var int $startZ
* @var int $endX
* @var int $endZ
* @var Level|string $level
* @var float $expires
*
* @return int
*/
public function addLand($player, $startX, $startZ, $endX, $endZ, $level, $expires = null){
if($level instanceof Level){
$level = $level->getFolderName();
Expand Down Expand Up @@ -664,7 +677,19 @@ public function addLand($player, $startX, $startZ, $endX, $endZ, $level, $expire
time()
);
}
return true;
return $id;
}

public function addInvitee($landId, $player){
return $this->db->addInviteeById($landId, $player);
}

public function removeInvitee($landId, $player){
return $this->db->removeInviteeById($landId, $player);
}

public function getLandInfo($landId){
return $this->db->getLandById($landId);
}

public function getMessage($key, $value = array("%1", "%2", "%3")){
Expand Down

0 comments on commit ac4564c

Please sign in to comment.