From 03c01b7c820a842c40ba945b3d18b51aaa4a7cb3 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 7 Mar 2018 13:33:36 -0500 Subject: [PATCH] Fix problem where level name being different from folder name causes warp to fail. --- src/essentialsTP/essentialsTP.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/essentialsTP/essentialsTP.php b/src/essentialsTP/essentialsTP.php index 80e6400..5cbfd74 100644 --- a/src/essentialsTP/essentialsTP.php +++ b/src/essentialsTP/essentialsTP.php @@ -599,7 +599,7 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar { $this->player_cords = array('x' => (int) $sender->getX(),'y' => (int) $sender->getY(),'z' => (int) $sender->getZ()); $this->username = $sender->getName(); - $this->world = $sender->getLevel()->getName(); + $this->world = $sender->getLevel()->getFolderName(); $this->home_loc = $args[0]; $this->prepare = $this->db2->prepare("SELECT player,title,x,y,z,world FROM homes WHERE player = :name AND title = :title"); $this->prepare->bindValue(":name", $this->username, SQLITE3_TEXT); @@ -948,7 +948,7 @@ public function onCommand(CommandSender $sender, Command $cmd, string $label, ar if((count($args) != 0) && (count($args) < 2)) { $this->player_cords = array('x' => (int) $sender->getX(),'y' => (int) $sender->getY(),'z' => (int) $sender->getZ()); - $this->world = $sender->getLevel()->getName(); + $this->world = $sender->getLevel()->getFolderName(); $this->warp_loc = $args[0]; $this->prepare = $this->db2->prepare("SELECT title,x,y,z,world FROM warps WHERE title = :title"); $this->prepare->bindValue(":title", $this->warp_loc, SQLITE3_TEXT);