Plex/src/main/java/dev/plex/command/impl/MasterbuilderworldCMD.java

41 lines
1.2 KiB
Java
Raw Normal View History

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.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(aliases = "mbw", description = "Teleport to the Master Builder world")
public class MasterbuilderworldCMD extends PlexCommand
{
public MasterbuilderworldCMD()
{
super("masterbuilderworld");
}
@Override
2022-01-27 05:28:30 +00:00
public Component execute(CommandSender sender, String[] args)
2021-06-20 08:02:07 +00:00
{
// TODO: Add adminworld settings
if (args.length == 0)
{
Location loc = new Location(Bukkit.getWorld("masterbuilderworld"), 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", "Master Builder world"));
}
}
@Override
2022-01-27 05:28:30 +00:00
public List<String> tabComplete(CommandSender sender, String[] args)
2021-06-20 08:02:07 +00:00
{
return Collections.emptyList();
}
}