Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /sethome <text> [<text>]:
- usage: /sethome <name>
- description: Set your myhome
- permission: myhome.sethome
- trigger:
- if arg 2 is set:
- message "{@tag}You have entered more than 1 word for your home!"
- message "{@tag}This is not allowed!"
- stop
- if {sethomes} is 3:
- player does not have permission "myhome.6houses":
- player does not have permission "myhome.vip":
- message "{@tag}You cannot set more than 3 homes!"
- stop
- if {sethomes} is 6:
- player does not have permission "myhome.vip":
- message "{@tag}You cannot set more than 6 homes!"
- stop
- if {sethomes} is not set:
- set {sethomes} to 0
- set {%player%.x} to x coord of player
- set {%player%.y} to y coord of player
- set {%player%.z} to z coord of player
- set yaml value "homes.%player%.%arg 1%.x" from file "Test/sethomes.yml" to "%{%player%.x}%"
- set yaml value "homes.%player%.%arg 1%.y" from file "Test/sethomes.yml" to "%{%player%.y}%"
- set yaml value "homes.%player%.%arg 1%.z" from file "Test/sethomes.yml" to "%{%player%.z}%"
- message "{@tag}You have set your home %arg 1% to location %location%"
- set yaml value "homes.%player%.%arg 1%.active" from file "Test/sethomes.yml" to "true"
- set {home.%player%::%arg 1%} to location of player
- set {homename.%player%::%arg 1%} to arg 1
- set {sethome.%player%} to true
- command /delhome <text> [<text>]:
- usage: /delhome <name>
- description: Delete your myhome
- permission: myhome.delhome
- trigger:
- if arg 2 is set:
- message "{@tag}You have entered more than 1 word for your home!"
- message "{@tag}This is not allowed!"
- stop
- if {home.%player%::%arg 1%} is set:
- set yaml value "homes.%player%.%arg 1%.active" from file "Test/sethomes.yml" to "false"
- delete {home.%player%::%arg 1%}
- delete {homename.%player%::%arg 1%}
- message "{@tag}You have deleted home %arg 1%"
- remove 1 from {sethomes}
- stop
- message "{@tag}You have not set that home!"
- command /home <text=abcdefghijklmnopqrstuvwxyz> [<text>]:
- usage: /home <name>
- description: Go to your home
- permission: myhome.home
- trigger:
- if arg 2 is set:
- message "{@tag}You have entered more than 1 word for your home!"
- message "{@tag}This is not allowed!"
- stop
- if arg 1 is "abcdefghijklmnopqrstuvwxyz":
- message "{@tag}Here are your homes!"
- message "{@tag}%{homename.%player%::*}%"
- stop
- if {home.%player%::%arg 1%} is set:
- teleport player to {home.%player%::%arg 1%}
- message "{@tag}You have been teleported to your home!"
- on command:
- if {test.loaded} is not set:
- set {test.loaded} to true
- set yaml value "homes" from file "Test/sethomes.yml" to ""
- command /adminhome:
- permission: myhome.adminhome
- trigger:
- message "{@tag}Enter the person's name in chat to see their homes and then enter their home name to teleport to it!"
- set {myhome.adminchat.%player%} to true
- on chat:
- if {myhome.adminchat.%player%} is true:
- cancel the event
- message "{@tag}You entered %message%. Checking if message is a player's name"
- if {sethome.%message%} is true:
- message "{@tag}You entered a player's name!"
- message "{@tag}Their homes are: "
- message "{@tag}%{homename.%message%::*}%"
- set {myhome.%player%.name} to "%message%"
- set {myhome.admintp.%player%} to true
- message "{@tag}Now enter a home name to teleport to that player's home!"
- set {myhome.adminchat.%player%} to false
- stop
- message "{@tag}That name is invalid or they haven't set a home yet please try again"
- if {myhome.admintp.%player%} is true:
- cancel the event
- message "{@tag}You have entered %message%. Checking if it a home name!"
- if {home.%{myhome.%player%.name}%::%message%} is set:
- message "{@tag}The home name entered was correct!"
- message "{@tag}Teleporting..."
- teleport player to {home.%{myhome.%player%.name}%::%message%}
- set {myhome.admintp.%player%} to false
- stop
- message "{@tag}You have entered an invalid home! Try again!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement