mirror of
https://github.com/plexusorg/Plex.git
synced 2024-11-17 00:56:12 +00:00
24 lines
995 B
Java
24 lines
995 B
Java
package dev.plex.command.impl;
|
|
|
|
import dev.plex.command.PlexCommand;
|
|
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.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
@CommandParameters(name = "localspawn", description = "Teleport to the spawnpoint of the world you are in")
|
|
@CommandPermissions(level = Rank.OP, permission = "plex.spawnpoint", source = RequiredCommandSource.IN_GAME)
|
|
public class LocalSpawnCMD extends PlexCommand
|
|
{
|
|
@Override
|
|
protected Component execute(@NotNull CommandSender sender, @Nullable Player playerSender, String[] args)
|
|
{
|
|
playerSender.teleportAsync(playerSender.getWorld().getSpawnLocation());
|
|
return tl("teleportedToWorldSpawn");
|
|
}
|
|
} |