Merge branch 'master' of https://github.com/plexusorg/Plex into taah-cmd-blocker

This commit is contained in:
Telesphoreo 2022-04-08 18:56:57 -05:00
commit ec7d814467
2 changed files with 16 additions and 4 deletions

View File

@ -126,10 +126,21 @@ public class WorldListener extends PlexListener
public void onWorldTeleport(PlayerTeleportEvent e)
{
final World adminworld = Bukkit.getWorld("adminworld");
PlexPlayer plexPlayer = DataUtils.getPlayer(e.getPlayer().getUniqueId());
if (e.getTo().getWorld().equals(adminworld) && !plexPlayer.isAdminActive())
if (adminworld == null)
{
e.setCancelled(true);
return;
}
PlexPlayer plexPlayer = DataUtils.getPlayer(e.getPlayer().getUniqueId());
if (e.getTo().getWorld().equals(adminworld))
{
if (plugin.getSystem().equals("ranks") && !plexPlayer.isAdminActive())
{
e.setCancelled(true);
}
else if (plugin.getSystem().equals("permissions") && !e.getPlayer().hasPermission("plex.enter.adminworld"))
{
e.setCancelled(true);
}
}
}

View File

@ -51,7 +51,8 @@ public class PlexUtils extends PlexBase
public static List<String> DEVELOPERS =
Arrays.asList("78408086-1991-4c33-a571-d8fa325465b2", // Telesphoreo
"f5cd54c4-3a24-4213-9a56-c06c49594dff", // Taahh
"ca83b658-c03b-4106-9edc-72f70a80656d" // ayunami2000
"ca83b658-c03b-4106-9edc-72f70a80656d", // ayunami2000
"2e06e049-24c8-42e4-8bcf-d35372af31e6" //Fleek
);
static