Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Fix Land Move Permissions #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions EconomyLand/src/onebone/economyland/EconomyLand.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,14 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar

if($info["owner"] !== $sender->getName()){
if(!$sender->hasPermission("economyland.land.move.others")){
$sender->sendMessage($this->getMessage("no-permission-move", [$info["ID"], $info["owner"], "%3"]));
$sender->sendMessage($this->getMessage("no-permission-move-others", [$info["ID"], $info["owner"], "%3"]));
return true;
}
}
if(!$sender->hasPermission("economyland.land.move")){
$sender->sendMessage($this->getMessage("no-permission-move"));
return true;
}
$level = $this->getServer()->getLevelByName($info["level"]);
if(!$level instanceof Level){
$sender->sendMessage($this->getMessage("land-corrupted", array($num, $info["level"], "")));
Expand Down Expand Up @@ -733,7 +737,8 @@ private function createConfig(){
"not-your-land" => "Land number %1 is not your land",
"no-land-found" => "There is no land number %1",
"land-corrupted" => "[EconomyLand] The World %2 of Land number %1 is corrupted.",
"no-permission-move" => "You have no permission to move to land %1. Owner : %2",
"no-permission-move" =>"You have no permission to move to land.",
"no-permission-move-others" => "You have no permission to move to land %1. Owner : %2",
"fail-moving" => "Failed to move to land %1",
"success-moving" => "Moved to land %1",
"land-list-top" => "Showing land list page %1 of %2\\n",
Expand Down