first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using NitroxModel.DataStructures.GameLogic;
using NitroxServer.ConsoleCommands.Abstract;
namespace NitroxServer.ConsoleCommands
{
internal class BackCommand : Command
{
public BackCommand() : base("back", Perms.MODERATOR, PermsFlag.NO_CONSOLE, "Teleports you back on your last location")
{
}
protected override void Execute(CallArgs args)
{
Player player = args.Sender.Value;
if (player.LastStoredPosition == null)
{
SendMessage(args.Sender, "No previous location...");
return;
}
player.Teleport(player.LastStoredPosition.Value, player.LastStoredSubRootID);
SendMessage(args.Sender, $"Teleported back to {player.LastStoredPosition.Value}");
}
}
}