2021-06-20 08:02:07 +00:00
|
|
|
package dev.plex.command.impl;
|
|
|
|
|
2022-01-04 03:04:39 +00:00
|
|
|
import dev.plex.command.PlexCommand;
|
2021-06-20 08:02:07 +00:00
|
|
|
import dev.plex.command.annotation.CommandParameters;
|
|
|
|
import dev.plex.command.annotation.CommandPermissions;
|
|
|
|
import dev.plex.command.source.CommandSource;
|
|
|
|
import dev.plex.command.source.RequiredCommandSource;
|
|
|
|
import dev.plex.rank.enums.Rank;
|
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
import org.bukkit.Location;
|
2022-01-04 03:04:39 +00:00
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
2021-06-20 08:02:07 +00:00
|
|
|
|
|
|
|
@CommandPermissions(level = Rank.ADMIN, source = RequiredCommandSource.IN_GAME)
|
|
|
|
@CommandParameters(description = "Teleport to the flatlands")
|
|
|
|
public class FlatlandsCMD extends PlexCommand
|
|
|
|
{
|
|
|
|
public FlatlandsCMD()
|
|
|
|
{
|
|
|
|
super("flatlands");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void execute(CommandSource sender, String[] args)
|
|
|
|
{
|
|
|
|
if (args.length == 0)
|
|
|
|
{
|
|
|
|
Location loc = new Location(Bukkit.getWorld("flatlands"), 0, 50, 0);
|
2022-01-04 03:04:39 +00:00
|
|
|
sender.getPlayer().teleportAsync(loc);
|
2021-06-20 08:02:07 +00:00
|
|
|
send(tl("teleportedToWorld", "flatlands"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<String> onTabComplete(CommandSource sender, String[] args)
|
|
|
|
{
|
|
|
|
return Collections.emptyList();
|
|
|
|
}
|
|
|
|
}
|