Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: <##408cde>&lᴘᴏʀᴛᴀʟ
- chatc: <##c8d9eb>
- chatc2: <##82b3e8>
- portalwand: stick named "<##800be0>&lᴘᴏʀᴛᴀʟᴡᴀɴᴅ" with lore "", "&7Left click to set &fPos1", "&7Right click to set &fPos2" with all flags hidden
- on left click with stick:
- if 1 of player's tool is {@portalwand}:
- set {position.1.%uuid of player%} to location of clicked block
- send "{@prefix} &8» {@chatc2}Pos1 {@chatc}has been set"
- on right click with stick:
- if 1 of player's tool is {@portalwand}:
- set {position.2.%uuid of player%} to location of clicked block
- send "{@prefix} &8» {@chatc2}Pos2 {@chatc}has been set"
- on block break:
- if 1 of player's tool is {@portalwand}:
- cancel event
- on disconnect:
- delete {position.1.%uuid of player%}
- delete {position.2.%uuid of player%}
- on bound enter:
- set {_id} to id of event-bound
- if {portal.list::*} contains {_id}:
- if {portal.loc.%{_id}%} is set:
- teleport player to {portal.loc.%{_id}%}
- send "{@prefix} &8» {@chatc}you have been teleported to {@chatc2}%{_id}%"
- else:
- send "{@prefix} &8» {@chatc}First set the location u want to teleport to"
- else:
- send "testing %{_id}%"
- command /portalwand:
- permission: portal.wand
- trigger:
- give player {@portalwand}
- send "{@prefix} &8» {@chatc}You succesfully recieved 1x {@chatc2}ᴘᴏʀᴛᴀʟᴡᴀɴᴅ"
- command /createportal [<text>]:
- permission: portal.create
- trigger:
- if arg-1 is set:
- if {portal.list::*} contains arg-1:
- send "{@prefix} &8» {@chatc}This portal already exists"
- else:
- if {position.1.%uuid of player%} is set:
- if {position.2.%uuid of player%} is set:
- add arg-1 to {portal.list::*}
- create a new bound with id arg-1 between {position.1.%uuid of player%} and {position.2.%uuid of player%}
- send "{@prefix} &8» {@chatc}Succesfully created a portal named {@chatc2}%arg-1%"
- else:
- send "{@prefix} &8» {@chatc}Your {@chatc2}Pos2 {@chatc}is not set"
- else:
- send "{@prefix} &8» {@chatc}Your {@chatc2}Pos2 {@chatc}is not set"
- else:
- send "{@prefix} &8» {@chatc}Specify the name u want to create a portal with"
- command /delportal [<text>]:
- permission: portal.delete
- trigger:
- if arg-1 is set:
- if {portal.list::*} contains arg-1:
- delete bound with id arg-1
- remove arg-1 from {portal.list::*}
- delete {portal.loc.%arg-1%}
- send "{@prefix} &8» {@chatc}succesfully deleted a portal named {@chatc2}%arg-1%"
- else:
- send "{@prefix} &8» {@chatc}This portal does not exist"
- else:
- send "{@prefix} &8» {@chatc}Specify the name of the portal you want to delete"
- on tab complete of "/delportal":
- set tab completions for position 1 to {portal.list::*}
- command /portal [<text>] [<text>]:
- permission: portal.mcmd
- trigger:
- if arg-1 is "setloc":
- if arg-2 is set:
- if {portal.list::*} contains arg-2:
- set {portal.loc.%arg-2%} to player's position
- set yaw of {portal.loc.%arg-2%} to player's yaw
- set pitch of {portal.loc.%arg-2%} to player's pitch
- send "{@prefix} &8» {@chatc}The location for {@chatc2}%arg-2% {@chatc}has been set"
- else:
- send "{@prefix} &8» {@chatc}A portal named {@chatc2}%arg-2% {@chatc}does not exist"
- else:
- send "{@prefix} &8» {@chatc}Specify the portal u want to set a location for"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement