diff --git a/resources/deu.ini b/resources/deu.ini index e00c1415..cb54d9ef 100644 --- a/resources/deu.ini +++ b/resources/deu.ini @@ -3,7 +3,7 @@ ; Updated time : 1/10/2020 ; Popup when entering a plot -popup=Du hast das Grundstück {%0} betreten. +popup=Du hast das Grundstück {%0} betreten popup.owner=Dieses Grundstück gehört {%0} popup.forsale=Du kannst dieses Grundtück für ${%0} kaufen popup.available=Dieses Grundstück ist verfügbar! Benutze /p claim, um es zu beanspruchen. @@ -23,7 +23,6 @@ error=Ups! Irgendetwas ist falsch gelaufen! notinplot=Du befindest dich nicht auf einem Grundstück. notowner=Dieses Grundstück gehört dir nicht! plugin.disabled=Dieses Plugin ist deaktiviert -noeconomy="Das Plugin benutzt kein valides Economy System. Um dieses Feture zu benutzen, stelle sicher dass du ein solches Plugin benutzt." confirm=confirm diff --git a/resources/langtemplate.ini b/resources/langtemplate.ini index d585f906..f6bf75e7 100644 --- a/resources/langtemplate.ini +++ b/resources/langtemplate.ini @@ -4,8 +4,8 @@ ; Popup when entering a plot popup= -popup.buy= popup.owner= +popup.forsale= popup.available= popup.denied= @@ -26,7 +26,6 @@ error= notinplot= notowner= plugin.disabled= -noeconomy= confirm=confirm @@ -293,9 +292,6 @@ kick.dropdown= sell.name= sell.desc= sell.usage= -sell.unclaimed= -sell.already= -sell.minprice= sell.success= ; the /p buy Subcommand @@ -303,8 +299,7 @@ buy.name= buy.desc= buy.usage= buy.noself= -buy.notinsale= -buy.nomoney= +buy.notforsale= buy.confirm= buy.success= buy.sold= \ No newline at end of file diff --git a/src/MyPlot/EventListener.php b/src/MyPlot/EventListener.php index e06cc45e..fa163bbd 100644 --- a/src/MyPlot/EventListener.php +++ b/src/MyPlot/EventListener.php @@ -312,11 +312,11 @@ private function onEventOnMove(Player $player, $event) : void { } if(!$this->plugin->getConfig()->get("ShowPlotPopup", true)) return; - $popup = $this->plugin->getLanguage()->translateString("popup", [TextFormat::GREEN . $plot . TextFormat::RESET]); + $popup = $this->plugin->getLanguage()->translateString("popup", [TextFormat::GREEN . $plot]); if(!empty($plot->owner)) { $owner = TextFormat::GREEN . $plot->owner; if($plot->price > 0) { - $ownerPopup = $this->plugin->getLanguage()->translateString("popup.buy", [$owner.TextFormat::RESET, $plot->price]); + $ownerPopup = $this->plugin->getLanguage()->translateString("popup.forsale", [$owner.TextFormat::RESET, $plot->price]); }else{ $ownerPopup = $this->plugin->getLanguage()->translateString("popup.owner", [$owner]); } diff --git a/src/MyPlot/provider/EconomyProvider.php b/src/MyPlot/provider/EconomyProvider.php index fdf99271..5f2ad84d 100644 --- a/src/MyPlot/provider/EconomyProvider.php +++ b/src/MyPlot/provider/EconomyProvider.php @@ -5,14 +5,6 @@ use pocketmine\Player; interface EconomyProvider { - - /** - * @param Player $player - * - * @return float - */ - public function getMoney(Player $player) : float; - /** * @param Player $player * @param float $amount diff --git a/src/MyPlot/provider/EconomySProvider.php b/src/MyPlot/provider/EconomySProvider.php index 062fe290..8a909850 100644 --- a/src/MyPlot/provider/EconomySProvider.php +++ b/src/MyPlot/provider/EconomySProvider.php @@ -19,15 +19,6 @@ public function __construct(EconomyAPI $plugin) { $this->plugin = $plugin; } - /** - * @param Player $player - * - * @return float - */ - public function getMoney(Player $player) : float { - return ($money = $this->plugin->myMoney($player)) === false ? 0 : $money; - } - /** * @param Player $player * @param float $amount diff --git a/src/MyPlot/provider/YAMLDataProvider.php b/src/MyPlot/provider/YAMLDataProvider.php index 3fc9df43..1f1edb8e 100644 --- a/src/MyPlot/provider/YAMLDataProvider.php +++ b/src/MyPlot/provider/YAMLDataProvider.php @@ -116,7 +116,6 @@ public function getPlotsByOwner(string $owner, string $levelName = "") : array { if($levelName != "") { /** @var int[] $levelKeys */ $levelKeys = array_keys($plots, $levelName); - /** @var int[] $ownerKeys */ $ownerKeys = array_keys($plots, $owner); foreach($levelKeys as $levelKey) { foreach($ownerKeys as $ownerKey) { @@ -160,7 +159,7 @@ public function getPlotsByOwner(string $owner, string $levelName = "") : array { * * @return Plot|null */ - public function getNextFreePlot(string $levelName, int $limitXZ = 0) : ?Plot { + public function getNextFreePlot(string $levelName, int $limitXZ = 0) : ?plot { $plotsArr = $this->yaml->get("plots", []); for($i = 0; $limitXZ <= 0 or $i < $limitXZ; $i++) { $existing = []; @@ -205,7 +204,6 @@ public function getNextFreePlot(string $levelName, int $limitXZ = 0) : ?Plot { } public function close() : void { - $this->yaml->save(); // why don't save it on close?? unset($this->yaml); } } \ No newline at end of file