Added TP Lock for modders
This commit is contained in:
parent
de0f7e2c2b
commit
f49ffe7647
1 changed files with 22 additions and 16 deletions
|
|
@ -52,6 +52,7 @@ namespace TShockAPI
|
||||||
public bool IsLoggedIn;
|
public bool IsLoggedIn;
|
||||||
public int UserID = -1;
|
public int UserID = -1;
|
||||||
public bool HasBeenNaggedAboutLoggingIn;
|
public bool HasBeenNaggedAboutLoggingIn;
|
||||||
|
public bool TpLock = false;
|
||||||
Player FakePlayer;
|
Player FakePlayer;
|
||||||
|
|
||||||
public bool RealPlayer
|
public bool RealPlayer
|
||||||
|
|
@ -183,6 +184,8 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Teleport(int tilex, int tiley)
|
public bool Teleport(int tilex, int tiley)
|
||||||
|
{
|
||||||
|
if (!TpLock)
|
||||||
{
|
{
|
||||||
InitSpawn = false;
|
InitSpawn = false;
|
||||||
|
|
||||||
|
|
@ -203,6 +206,9 @@ namespace TShockAPI
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
SendMessage("Cannot teleport due to TP Lock", Color.Red);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void Spawn()
|
public void Spawn()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue