Add /sync command to alleviate door related sadness

Run /sync if your doors disappear. This will resync your local client
with the server state. For more information, please see the associated
changelog entry.
This commit is contained in:
Lucas Nicodemus 2020-05-29 21:04:48 -07:00
parent 44ad2d2eff
commit f82ab41a25
No known key found for this signature in database
GPG key ID: A07BD9023D1664DB
5 changed files with 26 additions and 3 deletions

View file

@ -589,6 +589,10 @@ namespace TShockAPI
{
HelpText = "Creates a reference tables for Terraria data types and the TShock permission system in the server folder."
});
add(new Command(Permissions.synclocalarea, SyncLocalArea, "sync")
{
HelpText = "Sends all tiles from the server to the player to resync the client with the actual world state."
});
#endregion
add(new Command(Aliases, "aliases")
@ -5302,6 +5306,13 @@ namespace TShockAPI
return;
}
private static void SyncLocalArea(CommandArgs args)
{
args.Player.SendTileSquare((int) args.Player.TileX, (int) args.Player.TileY, 32);
args.Player.SendWarningMessage("Sync'd!");
return;
}
#endregion General Commands
#region Cheat Commands