mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2025-02-16 02:36:31 +00:00
A few more adminworld checks.
This commit is contained in:
parent
8718b3a8c2
commit
1f32455e06
1 changed files with 14 additions and 2 deletions
|
@ -54,6 +54,11 @@ public class Command_adminworld extends TFM_Command
|
||||||
{
|
{
|
||||||
case TELEPORT:
|
case TELEPORT:
|
||||||
{
|
{
|
||||||
|
if (!(sender instanceof Player) || sender_p == null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
World adminWorld = null;
|
World adminWorld = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -69,10 +74,17 @@ public class Command_adminworld extends TFM_Command
|
||||||
sender_p.teleport(server.getWorlds().get(0).getSpawnLocation());
|
sender_p.teleport(server.getWorlds().get(0).getSpawnLocation());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (TFM_AdminWorld.getInstance().canAccessWorld(sender_p))
|
||||||
{
|
{
|
||||||
playerMsg("Going to the AdminWorld.");
|
playerMsg("Going to the AdminWorld.");
|
||||||
TFM_AdminWorld.getInstance().sendToWorld(sender_p);
|
TFM_AdminWorld.getInstance().sendToWorld(sender_p);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playerMsg("You don't have permission to access the AdminWorld.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue