Jump to content

Spawn Skript


Relly

Recommended Posts

A simple spawn Skript for people to navigate around your server to the spawn point easily!
Add this script to your server, save, reload via /sk reload <file-name> and your ready to go!

Commands:

/spawn - Teleport to spawn when it is set (/setspawn)

/setspawn - Set the spawn point to your location - requires commands.setspawn permission (definable in options) - cooldown of 3 seconds (also definable in options).

Permissions:

commands.setspawn - Defined in options - /setspawn command

Configuration

For this to work, you will need to configure it properly, the options are already defined however you may change if you wish.

image.png.6cdbf5cf1088989366ac0c8e77772df1.png

prefix - prefix/"first word" while using /spawn or /setspawn

spawnCommandCooldown - cooldown when using /spawn command

setSpawnCommandPermission - permission for using /setspawn command

noPermissionMessage - define a no-permission message when someone tries to use a command in the spawn script that they don't have permission for.

Once you have define your options, finally you will need a user with the permission commands.setspawn to define your spawn location, when you are in the position, type /setspawn.

Finally, you can test it using /spawn!

Thanks for using my script! This is a untested script so please mention in the comments below if this worked for you, or if you have found an error. Enjoy!

Tested: No
 

# Thanks for using my script!
#
# My Info:
# Ingame-username: SkyyIsCool
# Discord: Skyy#0268

options:
    prefix: &8[&e&lSpawn&8]&f
    spawnCommandCooldown: 3 seconds
    setSpawnCommandPermission: commands.setspawn
    noPermissionMessage: &cYou do not have permission to use this command.

command /spawn:
    cooldown: {@spawnCommandCooldown}
    description: Teleport to the spawn point.
    usage: /spawn
    trigger:
        if {spawn} is set:
            teleport player to {spawn}
            send "{@prefix} &aTeleported to &eSpawn&a!" to player
        else:
            send "{@prefix} &cSpawn is not set, please contact a server administrator to use &e/setspawn&c." to player

command /setspawn:
    permission: {@setSpawnCommandPermission}
    permission message: {@noPermissionMessage}
    description: Set the spawn point.
    usage: /setspawn
    trigger:
        set {spawn} to location of player
        send "{@prefix} &aLocation for &eSpawn&a has been set to your current location." to player

 

Edited by Relly
Update My Info
  • Like 1
Link to comment
Share on other sites

  • 9 months later...
options:
    prefix: &7[&9&lYOUR SERVER NAME HERE&7] &7»

command setspawn:
    permission: op 
    trigger:
        set {spawn} to location of player
        send "{@prefix} &aSpawn was set to &6%{spawn}%&a!"

command spawn:
    trigger:
        teleport player to {spawn}
        send "{@prefix} &aYou were teleported to spawn!"

on join:
    teleport player to {spawn}

Here is an old code I wrote, unsure if it still is working should be. This should fix your issues.

Thank you, 

 
Ruby
 
"Turning code into solutions, one line at a time."
 

Community Management | Administration | Staff Management | Server Management | Development

 

Link to comment
Share on other sites

  • 3 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...