mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2026-06-05 15:56:54 +00:00
Begin SQL Storage
Remove mavenLocal for finding Plex
This commit is contained in:
@@ -6,6 +6,8 @@ import dev.plex.command.annotation.CommandPermissions;
|
||||
import dev.plex.command.exception.PlayerNotFoundException;
|
||||
import dev.plex.command.source.RequiredCommandSource;
|
||||
import dev.plex.extras.TFMExtras;
|
||||
import dev.plex.extras.island.PlayerWorld;
|
||||
import dev.plex.extras.island.info.IslandPermissions;
|
||||
import dev.plex.util.PlexUtils;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -73,6 +75,14 @@ public class MyWorldCommand extends PlexCommand
|
||||
{
|
||||
return messageComponent("worldLoadError");
|
||||
}
|
||||
final PlayerWorld playerWorld = TFMExtras.getModule().getIslandHandler().loadedIslands().get(target.getUniqueId());
|
||||
if (playerWorld != null)
|
||||
{
|
||||
if (playerWorld.visitPermission() == IslandPermissions.NOBODY || (playerWorld.visitPermission() == IslandPermissions.MEMBERS && !playerWorld.members().contains(target.getUniqueId())))
|
||||
{
|
||||
return messageComponent("cannotAccessIsland");
|
||||
}
|
||||
}
|
||||
player.teleportAsync(world.getSpawnLocation());
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_ENDERMAN_TELEPORT, 1f, 1f);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user