diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index fcc8b8f9..b17a43f9 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3339,11 +3339,10 @@ namespace TShockAPI return true; } - if (!isNPC && !args.Player.Group.HasPermission(Permissions.tp)) + if (!isNPC && !args.Player.Group.HasPermission(Permissions.rod)) { args.Player.SendErrorMessage("You do not have permission to teleport."); - Main.player[id].Teleport(new Vector2(Main.player[id].position.X, Main.player[id].position.Y), style); - NetMessage.SendData(65, -1, -1, "", 0, (float)id, Main.player[id].position.X, Main.player[id].position.Y, style); + args.Player.Teleport(args.TPlayer.position.X, args.TPlayer.position.Y); return true; } diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index 17d2e7c4..0f58e760 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -210,6 +210,9 @@ namespace TShockAPI [Description("User can use /spawn.")] public static readonly string spawn = "tshock.tp.spawn"; + [Description("User can use the Rod of Discor.")] + public static readonly string rod = "tshock.tp.rod"; + // tshock.world nodes [Description("Allows you to edit the spawn.")]