Skript Teleport

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Shan12010MC

Member
Dec 14, 2017
2
0
0
Hello Everyone!

So I create a Skript Teleport plugin which allows me to easily teleport to people and teleport people to me. After I finished making the plugin I realized that the plugin override the vanilla teleport command. So I need help with making a command that allows me to teleport to coordinates. So, it would be much appreciated if someone can help me with this.

Here is what I want:
/tp [x] [y] [z] OR /tp [player] [x] [y] [z] [world]

Here is my code for the /tp command so far:

code_language.skript:
command /tp [<player>] [<player>]:
    trigger:
        if argument 1 is set:
            if argument 2 is set:
                if player has permission "hyper.tp":
                    teleport arg-1 to arg-2:
                        message "&c&lHyper&8&lGames &8&l> &r&aTeleported &4%arg 1% &ato &4%arg 2%"
                if player doesn't have permission "hyper.tp":
                    message "&cYou do not have permission to execute this command."
            else:
                if player has permission "hyper.tp":
                    teleport player to arg-1
                    message "&c&lHyper&8&lGames &8&l> &r&aTeleported to &4%arg 1%"
                if player doesn't have permission "hyper.tp":
                    message "&cYou do not have permission to execute this command."
        else:
            if player has permission "hyper.tp":
                message "&c&lHyper&8&lGames &8&l> &r&cUsage: /tp [player] OR /tp [x] [y] [z]"
            if player doesn't have permission "hyper.tp":
                message "&cYou do not have permission to execute this command."
 
Last edited:
... Why not just use the vanilla teleport command? It can teleport players to each other too. Or you could just name this command something different so you don't override the vanilla one.
 
Vanilla Teleport command doesn't support custom features such as cooldown and customized message
 
If you want the exact functionality of the vanilla command but with a cooldown, you should just detect when they run the vanilla command with 'on command' and then wrap your own behavior around that to control whether they can execute the command or not.
 
Wow, I didn't know it was possible to do that! Thanx for the tip :emoji_slight_smile:
If you want the exact functionality of the vanilla command but with a cooldown, you should just detect when they run the vanilla command with 'on command' and then wrap your own behavior around that to control whether they can execute the command or not.
 
Status
Not open for further replies.