mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
A few more adminworld checks.
This commit is contained in:
parent
8718b3a8c2
commit
1f32455e06
@ -54,6 +54,11 @@ public class Command_adminworld extends TFM_Command
|
||||
{
|
||||
case TELEPORT:
|
||||
{
|
||||
if (!(sender instanceof Player) || sender_p == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
World adminWorld = null;
|
||||
try
|
||||
{
|
||||
@ -70,8 +75,15 @@ public class Command_adminworld extends TFM_Command
|
||||
}
|
||||
else
|
||||
{
|
||||
playerMsg("Going to the AdminWorld.");
|
||||
TFM_AdminWorld.getInstance().sendToWorld(sender_p);
|
||||
if (TFM_AdminWorld.getInstance().canAccessWorld(sender_p))
|
||||
{
|
||||
playerMsg("Going to the AdminWorld.");
|
||||
TFM_AdminWorld.getInstance().sendToWorld(sender_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
playerMsg("You don't have permission to access the AdminWorld.");
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user