Update this to Plex 1.4

This commit is contained in:
Taah
2023-08-28 04:31:52 -07:00
parent ea551c5427
commit 76b2c609eb
21 changed files with 317 additions and 49 deletions

View File

@ -7,7 +7,7 @@ import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import dev.plex.command.exception.PlayerNotFoundException;
import dev.plex.player.PlexPlayer;
import dev.plex.rank.enums.Rank;
import net.kyori.adventure.text.Component;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
@ -18,7 +18,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
@CommandParameters(name = "autoteleport", description = "If a player is specified, it will toggle whether or not the player is automatically teleported when they join. If no player is specified, you will be randomly teleported", usage = "/<command> [player]", aliases = "autotp,rtp,randomtp,tpr")
@CommandPermissions(level = Rank.OP, permission = "plex.tfmextras.autotp")
@CommandPermissions( permission = "plex.tfmextras.autotp")
public class AutoTeleportCommand extends PlexCommand
{
@Override
@ -33,7 +33,7 @@ public class AutoTeleportCommand extends PlexCommand
player.teleportAsync(TFMExtras.getRandomLocation(player.getWorld()));
return null;
}
checkRank(sender, Rank.ADMIN, "plex.tfmextras.autotp.other");
checkPermission(sender, "plex.tfmextras.autotp.other");
PlexPlayer target = DataUtils.getPlayer(args[0]);
if (target == null)
{