Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on join:
- if player is in world "world":
- teleport player to {spawn.world}
- stop
- stop
- command /setspawn:
- permission: sk.setspawn
- description: Set the spawnpoint location for a world.
- trigger:
- execute console command "execute at %player% run setworldspawn"
- set {spawn.%world%} to location of player
- wait 1 tick
- message "&6%world%'s spawnpoint set! &8(%{spawn.%world%}%)" to player
- stop
- command /spawn:
- permission: sk.spawn
- description: Teleports you to the spawnpoint of the world.
- trigger:
- set {back.%player%} to location of player
- teleport player to {spawn.%world%}
- message "&3Teleporting to the spawn of world: &9%player's world%" to player
- stop
- command /back:
- permission: sk.back
- description: Return to a previous area.
- trigger:
- if {back.%player%} is set:
- set {back1.%player%} to location of player
- wait 1 tick
- teleport player to {back.%player%}
- message "&6Returning to previous position. &c(%{back.%player%}%)"
- wait 1 tick
- set {back.%player%} to {back1.%player%}
- stop
- else:
- message "&cCannot return to a previous location. Sorry!"
- stop
- command /rtp:
- permission: sk.rtp
- description: Teleport to a random location.
- aliases: /wild, /randomteleport, /randomtp
- trigger:
- set {back.%player%} to location of player
- execute console command "spreadplayers -311 -17 1000 30000 false %player%"
- message "&6Teleporting to a random location!" to player
- stop
- command /sethome <text> [<text>]:
- permission: sk.home
- executable by: players
- description: Set a home.
- trigger:
- if arg 2 is set:
- message "&4Please use one word for the name!"
- stop
- else:
- player is op:
- if {%player%.%arg 1%.location} is set:
- message "&cThat home already exists!"
- stop
- else:
- add arg 1 to {homes.%world%.%player%::*}
- set {%player%.%arg 1%.location} to location of player
- wait 1 tick
- message "&6Set home &c%arg 1% &6 at location: &c%{%player%.%arg 1%.location}%"
- stop
- stop
- player has permission "sk.sethome.infinite":
- if {%player%.%arg 1%.location} is set:
- message "&cThat home already exists!"
- stop
- else:
- add arg 1 to {homes.%world%.%player%::*}
- set {%player%.%arg 1%.location} to location of player
- wait 1 tick
- message "&6Set home &c%arg 1% &6 at location: &c%{%player%.%arg 1%.location}%"
- stop
- stop
- size of {homes.%world%.%player%::*} is less than 3:
- if {%player%.%arg 1%.location} is set:
- message "&cThat home already exists!"
- else:
- add arg 1 to {homes.%world%.%player%::*}
- set {%player%.%arg 1%.location} to location of player
- wait 1 tick
- message "&6Set home &c%arg 1% &6 at location: &c%{%player%.%arg 1%.location}%"
- stop
- size of {homes.%world%.%player%::*} is between 3 and 4:
- player has permission "sk.sethome.5":
- if {%player%.%arg 1%.location} is set:
- message "&cThat home already exists!"
- else:
- add arg 1 to {homes.%world%.%player%::*}
- set {%player%.%arg 1%.location} to location of player
- wait 1 tick
- message "&6Set home &c%arg 1% &6 at location: &c%{%player%.%arg 1%.location}%"
- stop
- player does not have permission "sk.sethome.5":
- message "&cYou cannot set more than 3 homes!"
- stop
- size of {homes.%world%.%player%::*} is 5:
- player has permission "sk.sethome.infinite":
- if {%player%.%arg 1%.location} is set:
- message "&cThat home already exists!"
- else:
- add arg 1 to {homes.%world%.%player%::*}
- set {%player%.%arg 1%.location} to location of player
- wait 1 tick
- message "&6Set home &c%arg 1% &6 at location: &c%{%player%.%arg 1%.location}%"
- stop
- player does not have permission "sk.sethome.infinite":
- message "&cYou cannot set more than 5 homes!"
- stop
- command /home [<text>] [<text>]:
- permission: sk.home
- description: Teleport to a saved location!
- executable by: players
- trigger:
- if arg 2 is set:
- message "&cYour home can only be one word!"
- stop
- else if arg 1 is not set:
- if size of {homes.%world%.%player%::*} is 0:
- message "&cYou do not have any homes set!"
- else:
- message "&6Homes: &f%{homes.%world%.%player%::*}%"
- else if arg 1 is set:
- if {%player%.%arg 1%.location} is set:
- set {back.%player%} to location of player
- teleport player to {%player%.%arg 1%.location}
- message "&6Teleporting to home: &c%arg 1%"
- else:
- message "&cThat home does not exist!"
- command /delhome [<text>] [<text>]:
- permission: sk.home
- description: Delete a home.
- executable by: players
- trigger:
- if arg 2 is set:
- message "&cYour home can only be one word!"
- stop
- else if arg 1 is not set:
- message "&cYou must specify a home!"
- stop
- else if arg 1 is set:
- if {%player%.%arg 1%.location} is set:
- remove arg 1 from {homes.%world%.%player%::*}
- delete {%player%.%arg 1%.location}
- message "&6Home &c%arg 1% &6deleted."
- stop
- else if {%player%.%arg 1%.location} is not set:
- message "&cThat home does not exist!"
- stop
- command /homes:
- permission: sk.home
- description: List your homes.
- executable by: players
- trigger:
- if size of {homes.%world%.%player%::*} is 0:
- message "&cYou do not have any homes set!"
- else:
- message "&6Homes: &f%{homes.%world%.%player%::*}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement