Skip to content

Commit d4f2b9a

Browse files
authored
Merge pull request #103 from RocketModFix/fix/command-tp
Fix CommandTp says: "Failed to find destination"
2 parents 1dced06 + 0df08dc commit d4f2b9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Rocket.Unturned/Commands/CommandTp.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ public void Execute(IRocketPlayer caller, string[] command)
8989
}
9090
else
9191
{
92-
LocationDevkitNode item = LocationDevkitNodeSystem.Get().GetAllNodes().Where(n => n.locationName.IndexOf(command[0]) != -1).FirstOrDefault();
92+
var item = LocationDevkitNodeSystem
93+
.Get()
94+
.GetAllNodes()
95+
.FirstOrDefault(x => NameTool.checkNames(command[0], x.locationName));
9396
if (item != null)
9497
{
9598
Vector3 LocationPosition = item.transform.position + new Vector3(0f, 0.5f, 0f);

0 commit comments

Comments
 (0)