Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- aliases:
- superalias = 1, 2, 3, 4, 5, 7, 8, 9, 12, 13, 17, 19, 20, 22, 23, 24, 25, 29, 33, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 54, 57, 58, 60, 61, 79, 80, 82, 84, 86, 87, 88, 89, 91, 92, 95, 97, 98, 99, 100, 103, 110, 112, 116, 120, 121, 123, 126, 129, 130, 133, 137, 138, 139, 145, 146, 152, 153, 155, 158, 159, 162, 163, 164, 165, 166, 168, 169, 170, 172, 173, 174, 179, 181, 182, 201, 202, 203, 204, 205, 206, 208, 213, 214, 215, 216, 218
- on load:
- if file "plugins/Portals/config.yml" does not exist:
- create file "plugins/Portals/config.yml"
- set yml value "Time to type /pset <name> before the auto destruction of portal" of file "plugins/Portals/config.yml" to 20
- set yml value "No Permission" of file "plugins/Portals/config.yml" to "&4You don't have permission &cportal.create"
- set yml value "Time before the command expired" of file "plugins/Portals/config.yml" to "&4You didn't type &c/pset <name> &4at a sufficient speed! portal deleted"
- set yml value "This portal does not lead anywhere" of file "plugins/Portals/config.yml" to "&4The portal &c[Portal] &4does not lead anywhere"
- set yml value "Error" of file "plugins/Portals/config.yml" to "&4You're not facing the portal or you're not putin that block at the right place"
- set yml value "Please, run /pset <name> now" of file "plugins/Portals/config.yml" to "&6Put yourself where peoples should appear when they come from another portal, then do &b/portal spawn <name>"
- set yml value "Portal spawn set, set destination now" of file "plugins/Portals/config.yml" to "&6Portal spawn set. You should now do &b/portal dest [Portal] <destination>&6. Destination can be ""here""/""ici"" or a portal name"
- set yml value "You're done" of file "plugins/Portals/config.yml" to "&6You set the portal destination the destination or warping point at any moment!"
- set yml value "Portal to portal" of file "plugins/Portals/config.yml" to "&6Teleporting from &b[Portal1] &6to &b[Portal2]!"
- set yml value "Destination portal does not exist" of file "plugins/Portals/config.yml" to "&4The portal &c[Portal] &4does not exist!"
- on place of end portal frame:
- player doesn't have permission "portal.create":
- message coloured "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- stop
- cancel event
- wait 1 tick
- set {_loc} to location of event-block
- player's horizontal facing is west or east:
- set {_dir1} to west
- set {_dir2} to east
- set {_dir3} to north
- set {_dir4} to south
- player's horizontal facing is north or south:
- set {_dir1} to north
- set {_dir2} to south
- set {_dir3} to west
- set {_dir4} to east
- player's horizontal facing is {_dir1} or {_dir2}:
- add location of event-block to {_blocks::*}
- set {_num} to 0
- while {_num} is not 20:
- set {_still} to 0
- loop {_blocks::*}:
- block {_dir3} loop-value is air:
- {_blocks::*} does not contain location of block {_dir3} loop-value
- set {_still} to 1
- add location of block {_dir3} loop-value to {_blocks::*}
- block {_dir4} loop-value is air:
- {_blocks::*} does not contain location of block {_dir4} loop-value
- set {_still} to 1
- add location of block {_dir4} loop-value to {_blocks::*}
- block above loop-value is air:
- {_blocks::*} does not contain location of block above loop-value
- set {_still} to 1
- add location of block above loop-value to {_blocks::*}
- add 1 to {_num}
- {_num} is 19:
- {_still} is 1
- message coloured "%yml value ""Error"" of file ""plugins/Portals/config.yml""%"
- stop
- loop {_blocks::*}:
- @noupdate::set block at loop-value to water
- message coloured "%yml value ""Please, run /pset <name> now"" of file ""plugins/Portals/config.yml""%"
- set {blocks::*} to {_blocks::*}
- wait "%yml value ""Time to type /pset <name> before the auto destruction of portal"" of file ""plugins/Portals/config.yml""% seconds" parsed as timespan
- {blocks::*} is set
- message coloured "%yml value ""Time before the command expired"" of file ""plugins/Portals/config.yml""%"
- clear {blocks::*}
- loop {_blocks::*}:
- set block at loop-value to air
- command /portal1 <text> [<text>] [<text>]:
- aliases: /p
- trigger:
- player doesn't have permission "portal.create":
- message coloured "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- stop
- arg 1 is "setdest" or "dest" or "destination":
- arg 2 is set:
- arg 3 is set:
- arg 3 is not "ici" or "here":
- set yml value "portals.%arg 2%" of file "plugins/Portals/db.yml" to arg 3
- else:
- set yml value "portals.%arg 2%" of file "plugins/Portals/db.yml" to location of player
- message coloured "%yml value ""You're done"" of file ""plugins/Portals/config.yml""%"
- arg 1 is "setspawn" or "spawnpoint" or "spawn":
- arg 2 is set:
- {blocks::*} is set
- set yml value "arrivee.%arg 2%" of file "plugins/Portals/db.yml" to location of player
- loop {blocks::*}:
- add loop-value to yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
- clear {blocks::*}
- set {_message} to "%yml value ""Portal spawn set, set destination now"" of file ""plugins/Portals/config.yml""%"
- replace all "[Portal]" with "%arg 2%" in {_message}
- message coloured {_message}
- arg 1 is "list":
- player does not have permission "portal.list":
- set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- replace all "portal.create" with "portal.list" in {_message}
- message coloured {_message}
- stop
- message "&6&lList of portals"
- set {_portals::*} to yml nodes "arrivee" of file "plugins/Portals/db.yml"
- loop {_portals::*}:
- yml "portals.%loop-value%" in file "plugins/Portals/db.yml" exists:
- set {_destination} to yml value "portals.%loop-value%" of file "plugins/Portals/db.yml"
- {_destination} is not set:
- set {_destination} to "not set"
- set {_arrivee} to yml value "arrivee.%loop-value%" of file "plugins/Portals/db.yml"
- set {_arrivee} to "%{_arrivee}%"
- set {_destination} to "%{_destination}%"
- replace all "x: " or "y: " or "z: " with "" in {_arrivee}
- replace all "x: " or "y: " or "z: " with "" in {_destination}
- message "&6&l%loop-value%&6:"
- message "&6Spawn: &b%{_arrivee}% &6Destination: &b%{_destination}%"
- arg 1 is "delete" or "remove":
- player does not have permission "portal.delete":
- set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- replace all "portal.create" with "portal.delete" in {_message}
- message coloured {_message}
- stop
- arg 2 is set:
- set {_blocks::*} to yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
- loop {_blocks::*}:
- set block at loop-value to air
- delete yml value "portals.%arg 2%" of file "plugins/Portals/db.yml"
- delete yml list "blocks.%arg 2%" of file "plugins/Portals/db.yml"
- delete yml value "arrivee.%arg 2%" of file "plugins/Portals/db.yml"
- message "&6The portal &b%arg 2% &6was deleted"
- arg 1 is "help":
- player does not have permission "portal.help":
- set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- replace all "portal.create" with "portal.help" in {_message}
- message coloured {_message}
- stop
- message " "
- message "&6&lHelp for portal plugin &b(by Black_Eyes)"
- message "&6/portal setspawn/spawnpoint/point &b<portal name> &6: Set the spawnpoint of a portal"
- message "&6/portal setdest/dest/destination &b<portal name> <portal name/here> &6: Set the destination of a portal. &b""here"" &6will set it where you're standing"
- message "&6/portal delete/remove &b<portal name> &6: Completely removes a portal from database"
- message "&6/portal list &6: Shows you a list of all portals"
- message "&6/portal help &6: Guess it..."
- message " "
- arg 1 is not set:
- player does not have permission "portal.help":
- set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- replace all "portal.create" with "portal.help" in {_message}
- message coloured {_message}
- stop
- message " "
- message "&6&lHelp for portal plugin &b(by Black_Eyes)"
- message "&6/portal setspawn/spawnpoint/point &b<portal name> &6: Set the spawnpoint of a portal"
- message "&6/portal setdest/dest/destination &b<portal name> <portal name/here> &6: Set the destination of a portal. &b""here"" &6will set it where you're standing"
- message "&6/portal delete/remove &b<portal name> &6: Completely removes a portal from database"
- message "&6/portal list &6: Shows you a list of all portals"
- message "&6/portal help &6: Guess it..."
- message " "
- on walk on all ore or all stair or all shulker box or superalias:
- wait 1 tick
- block at player is water
- set {_nodes::*} to yml nodes "blocks" of file "plugins/Portals/db.yml"
- loop {_nodes::*}:
- set {_blocks::*} to yml list "blocks.%loop-value-1%" of file "plugins/Portals/db.yml"
- loop {_blocks::*}:
- distance between player and loop-value-2 is below 1:
- yml "portals.%loop-value-1%" in file "plugins/Portals/db.yml" exists:
- set {_value} to yml value "portals.%loop-value-1%" of file "plugins/Portals/db.yml"
- set {_nodes::*} to yml nodes "arrivee" of file "plugins/Portals/db.yml"
- {_value} is not a location:
- loop {_nodes::*}:
- "%loop-value-3%" is "%{_value}%":
- set {_pname} to {_value}
- set {_value} to yml value "arrivee.%{_value}%" of file "plugins/Portals/db.yml"
- {_value} is not a location:
- set {_message} to "%yml value ""Destination portal does not exist"" of file ""plugins/Portals/config.yml""%"
- replace all "[Portal]" with "%{_value}%" in {_message}
- message coloured {_message}
- stop
- player does not have permission "portal.use.%loop-value-1%":
- set {_message} to "%yml value ""No Permission"" of file ""plugins/Portals/config.yml""%"
- replace all "portal.create" with "portal.use.%loop-value-1%" in {_message}
- message coloured {_message}
- stop
- teleport player to {_value}
- set {_message} to "%yml value ""Portal to portal"" of file ""plugins/Portals/config.yml""%"
- replace all "[Portal1]" with "%loop-value-1%" in {_message}
- replace all "[Portal2]" with "%{_pname}%" in {_message}
- stop
- else:
- set {_message} to "%yml value ""This portal does not lead anywhere"" of file ""plugins/Portals/config.yml""%"
- replace all "[Portal]" with "%loop-value-1%" in {_message}
- message coloured {_message}
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement