Added TP Lock for modders

This commit is contained in:
Twitchy 2011-08-03 08:02:41 +12:00
parent de0f7e2c2b
commit f49ffe7647

View file

@ -52,6 +52,7 @@ namespace TShockAPI
public bool IsLoggedIn;
public int UserID = -1;
public bool HasBeenNaggedAboutLoggingIn;
public bool TpLock = false;
Player FakePlayer;
public bool RealPlayer
@ -183,6 +184,8 @@ namespace TShockAPI
}
public bool Teleport(int tilex, int tiley)
{
if (!TpLock)
{
InitSpawn = false;
@ -203,6 +206,9 @@ namespace TShockAPI
return true;
}
SendMessage("Cannot teleport due to TP Lock", Color.Red);
return false;
}
public void Spawn()
{