diff --git a/.changlogs.md b/.changlogs.md index 6ce9938..e3c1bfa 100644 --- a/.changlogs.md +++ b/.changlogs.md @@ -162,7 +162,8 @@ End of theSpawn PM3 support - *[POGGIT]* - forms are no longer dispatching commands - *[VERSION]* - Version bump -### Changelog V1.6.1 » V1.6.2-DEV -> This version does contain some major code changes from the previous version. It's only a code cleanup, feature and bug fix update. +### Changelog V1.6.1 » V1.6.2 +> This version does contain some code changes from the previous version. It's only a code cleanup and bug fix update. +- *[FIXED]* - TPA's cannot be awnsered ([#32](https://github.com/supercrafter333/theSpawn/issues/32)) - *[CLEANUP]* - sourced out events from `theSpawn.php` to `EventListener.php` - *[VERSION]* - Version bump \ No newline at end of file diff --git a/README.md b/README.md index c1e4b42..a4c668f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ > This version is under development and can contain bugs! [![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/ca6cWPpERp) -# theSpawn - V1.6.2-DEV [![](https://poggit.pmmp.io/shield.state/theSpawn)](https://poggit.pmmp.io/p/theSpawn) [![](https://poggit.pmmp.io/shield.dl.total/theSpawn)](https://poggit.pmmp.io/p/theSpawn) +# theSpawn - V1.6.2 [![](https://poggit.pmmp.io/shield.state/theSpawn)](https://poggit.pmmp.io/p/theSpawn) [![](https://poggit.pmmp.io/shield.dl.total/theSpawn)](https://poggit.pmmp.io/p/theSpawn) **This plugin is a much better MSpawns alternative! Help me to make this plugin better!** diff --git a/plugin.yml b/plugin.yml index c2312ee..0e6c3e0 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,5 +1,5 @@ name: theSpawn -version: 1.6.2-DEV +version: 1.6.2 api: 4.0.0 main: supercrafter333\theSpawn\theSpawn author: supercrafter333 diff --git a/resources/Languages/en_BE.yml b/resources/Languages/en_BE.yml index 8882c3a..3e495ed 100644 --- a/resources/Languages/en_BE.yml +++ b/resources/Languages/en_BE.yml @@ -125,7 +125,7 @@ no-spawn-set-for-world: "§cThere's no spawn set for world {world}!" -#compatible with v1.6.2-DEV (and lower) +#compatible with v1.6.2 (and lower) ############################ diff --git a/resources/Languages/ger_DE.yml b/resources/Languages/ger_DE.yml index 40fdc92..ecfb308 100644 --- a/resources/Languages/ger_DE.yml +++ b/resources/Languages/ger_DE.yml @@ -125,7 +125,7 @@ no-spawn-set-for-world: "§cEs wurde noch kein Spawn für die Welt {world} festg -#compatible with v1.6.2-DEV (and lower) +#compatible with v1.6.2 (and lower) ############################ diff --git a/resources/Languages/messages.yml b/resources/Languages/messages.yml index 83ea18c..f4ce490 100644 --- a/resources/Languages/messages.yml +++ b/resources/Languages/messages.yml @@ -125,7 +125,7 @@ no-spawn-set-for-world: "§cThere's no spawn set for world {world}!" #don't change this -version: "1.6.2-DEV" +version: "1.6.2" ############################ diff --git a/resources/config.yml b/resources/config.yml index 33efb3a..2f80a7b 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -52,7 +52,7 @@ language: "en_BE" #DON'T CHANGE THIS!! -version: "1.6.2-DEV" +version: "1.6.2" ############################ ##########theSpawn########## diff --git a/src/supercrafter333/theSpawn/Commands/TpacceptCommand.php b/src/supercrafter333/theSpawn/Commands/TpacceptCommand.php index 1e67dce..7e0d9fe 100644 --- a/src/supercrafter333/theSpawn/Commands/TpacceptCommand.php +++ b/src/supercrafter333/theSpawn/Commands/TpacceptCommand.php @@ -51,20 +51,20 @@ public function execute(CommandSender $s, string $commandLabel, array $args): vo $s->sendMessage($this->usageMessage); return; } - if (!$pl->hasTpaOf($args[0], $s->getName())) { + if (!$pl->hasTpaOf($s->getName(), $args[0])) { $s->sendMessage(str_replace("{target}", (string)$args[0], MsgMgr::getMsg("no-pending-tpa"))); return; } - $tpaInfo = new TpaInfo($s->getName()); + $tpaInfo = new TpaInfo($args[0]); if (!$tpaInfo->getTargetAsPlayer() instanceof Player) { - $s->sendMessage(str_replace("{target}", (string)$args[0], theSpawn::$prefix . MsgMgr::getMsg("player-not-online"))); + $s->sendMessage(str_replace("{target}", (string)$args[0], theSpawn::$prefix . MsgMgr::getMsg("player-not-found"))); return; } $target = $tpaInfo->getTargetAsPlayer(); $name = $target->getName(); $tpaInfo->complete(); - $target->sendMessage(str_replace("{target}", $name, theSpawn::$prefix . MsgMgr::getMsg("tpa-accepted-source"))); - $s->sendMessage(str_replace("{source}", $s->getName(), theSpawn::$prefix . MsgMgr::getMsg("tpa-accepted-target"))); + $s->sendMessage(str_replace("{target}", $name, theSpawn::$prefix . MsgMgr::getMsg("tpa-accepted-source"))); + $target->sendMessage(str_replace("{source}", $s->getName(), theSpawn::$prefix . MsgMgr::getMsg("tpa-accepted-target"))); } /** diff --git a/src/supercrafter333/theSpawn/theSpawn.php b/src/supercrafter333/theSpawn/theSpawn.php index 0272057..cb04ef4 100644 --- a/src/supercrafter333/theSpawn/theSpawn.php +++ b/src/supercrafter333/theSpawn/theSpawn.php @@ -79,11 +79,10 @@ class theSpawn extends PluginBase /** * @var string */ - public string $version = "1.6.2-DEV"; + public string $version = "1.6.2"; /** - * On plugin loading. (That's before enabling) * On plugin loading. (That's before enabling) */ public function onLoad(): void @@ -116,7 +115,6 @@ public function onEnable(): void } $this->aliasCfg = new Config($this->getDataFolder() . "aliaslist.yml", Config::YAML); $this->warpCfg = new Config($this->getDataFolder() . "warps.yml", Config::YAML); - $aliasCfg = new Config($this->getDataFolder() . "aliaslist.yml", Config::YAML); $cmdMap->registerAll("theSpawn", [ new SpawnCommand("spawn"), @@ -299,7 +297,6 @@ public function addTpa(string $source, string $target, bool $isTpaHere = false): { if (isset($this->TPAs[$source])) return false; $arr = ["target" => $target, "isTpaHere" => $isTpaHere]; - $this->TPAs[] = $source; $this->TPAs[$source] = $arr; return true; }