mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 09:06:41 +00:00
Migrate (what I could find) legacy component system uses to kyori component system
Create List command Remove fionn command Remove test command Add Mojang Utils Auto add Plex Players back to cache on start if any are online
This commit is contained in:
@ -5,20 +5,19 @@ 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 net.kyori.adventure.text.Component;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@CommandPermissions(level = Rank.ADMIN, source = RequiredCommandSource.IN_GAME)
|
||||
@CommandParameters(description = "Teleport to the flatlands")
|
||||
@CommandParameters(name = "flatlands", description = "Teleport to the flatlands")
|
||||
public class FlatlandsCMD extends PlexCommand
|
||||
{
|
||||
public FlatlandsCMD()
|
||||
{
|
||||
super("flatlands");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component execute(CommandSender sender, String[] args)
|
||||
@ -26,14 +25,9 @@ public class FlatlandsCMD extends PlexCommand
|
||||
if (args.length == 0)
|
||||
{
|
||||
Location loc = new Location(Bukkit.getWorld("flatlands"), 0, 50, 0);
|
||||
sender.getPlayer().teleportAsync(loc);
|
||||
send(tl("teleportedToWorld", "flatlands"));
|
||||
((Player)sender).teleportAsync(loc);
|
||||
return tl("teleportedToWorld", "flatlands");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tabComplete(CommandSender sender, String[] args)
|
||||
{
|
||||
return Collections.emptyList();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user