Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- logo: &4[&ePorte&4] : &r #Prefix chat
- blocks: horizontal pillar quartz block #Bloc a utilisé a la base de la porte
- blanc: white glass pane #Choix de la vitre
- noir: black glass pane #Choix de la vitre
- gris: gray glass pane #Choix de la vitre
- grisc: light gray glass pane #Choix de la vitre
- bleue: blue glass pane #Choix de la vitre
- delvitre: white glass pane or black glass pane or gray glass pane or light gray glass pane or blue glass pane
- rayon: 5 #Rayon d'action entre le panneau et l'option blocks défini plus haut
- on rightclick on a sign:
- if line 1 is "&e[Porte]":
- if line 3 is "Ouvrir":
- if {x_porte_.allow.%location of targeted block%::*} doesn't contain player:
- cancel event
- else:
- loop blocks in radius 3 around event-block:
- loop-block is a sign:
- wait 1 tick
- if line 1 is "&e[Porte]":
- wait 3 ticks
- set line 3 of loop-block to "Fermer"
- else if line 3 is "Fermer":
- if {x_porte_.allow.%location of targeted block%::*} doesn't contain player:
- cancel event
- else:
- loop blocks in radius 3 around event-block:
- loop-block is a sign:
- wait 1 tick
- if line 1 is "&e[Porte]":
- wait 3 ticks
- set line 3 of loop-block to "Ouvrir"
- on rightclick on a sign:
- if line 1 is "&e[Porte]":
- if gamemode of player is survival:
- set {_allow::*} to value list "Joueurs autorisés" get of "plugins/Porte/%event-location%.yml"
- if {_allow::*} doesn't contain player:
- cancel event
- message "{@logo}&4Tu n'es pas autorisé a utiliser cette porte"
- else:
- if line 2 is "2":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- if line 4 is "" or "blanc":
- wait 10 ticks
- set block 2 meter above loop-block to {@blanc}
- set block 1 meter above loop-block to {@blanc}
- if line 4 is "noir":
- wait 10 ticks
- set block 2 meter above loop-block to {@noir}
- set block 1 meter above loop-block to {@noir}
- if line 4 is "gris":
- wait 10 ticks
- set block 2 meter above loop-block to {@gris}
- set block 1 meter above loop-block to {@gris}
- if line 4 is "grisc":
- wait 10 ticks
- set block 2 meter above loop-block to {@grisc}
- set block 1 meter above loop-block to {@grisc}
- if line 4 is "bleue":
- wait 10 ticks
- set block 2 meter above loop-block to {@bleue}
- set block 1 meter above loop-block to {@bleue}
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- wait 10 ticks
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- if line 2 is "3":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- block above loop-block is air
- if line 4 is "" or "blanc":
- wait 10 ticks
- set block 3 meter above loop-block to {@blanc}
- set block 2 meter above loop-block to {@blanc}
- set block 1 meter above loop-block to {@blanc}
- if line 4 is "noir":
- wait 10 ticks
- set block 3 meter above loop-block to {@noir}
- set block 2 meter above loop-block to {@noir}
- set block 1 meter above loop-block to {@noir}
- if line 4 is "gris":
- wait 10 ticks
- set block 3 meter above loop-block to {@gris}
- set block 2 meter above loop-block to {@gris}
- set block 1 meter above loop-block to {@gris}
- if line 4 is "grisc":
- wait 10 ticks
- set block 3 meter above loop-block to {@grisc}
- set block 2 meter above loop-block to {@grisc}
- set block 1 meter above loop-block to {@grisc}
- if line 4 is "bleue":
- wait 10 ticks
- set block 3 meter above loop-block to {@bleue}
- set block 2 meter above loop-block to {@bleue}
- set block 1 meter above loop-block to {@bleue}
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- block above loop-block is {@delvitre}
- wait 10 ticks
- set block 3 meter above loop-block to air
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- if line 2 is "barriere2":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is cobblestone:
- wait 10 ticks
- set block 2 meter above loop-block to fence
- set block 1 meter above loop-block to fence
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is cobblestone:
- block above loop-block is fence
- wait 10 ticks
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- else:
- if line 2 is "2":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- if line 4 is "" or "blanc":
- wait 10 ticks
- set block 2 meter above loop-block to {@blanc}
- set block 1 meter above loop-block to {@blanc}
- if line 4 is "noir":
- wait 10 ticks
- set block 2 meter above loop-block to {@noir}
- set block 1 meter above loop-block to {@noir}
- if line 4 is "gris":
- wait 10 ticks
- set block 2 meter above loop-block to {@gris}
- set block 1 meter above loop-block to {@gris}
- if line 4 is "grisc":
- wait 10 ticks
- set block 2 meter above loop-block to {@grisc}
- set block 1 meter above loop-block to {@grisc}
- if line 4 is "bleue":
- wait 10 ticks
- set block 2 meter above loop-block to {@bleue}
- set block 1 meter above loop-block to {@bleue}
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- wait 10 ticks
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- if line 2 is "3":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- block above loop-block is air
- if line 4 is "" or "blanc":
- wait 10 ticks
- set block 3 meter above loop-block to {@blanc}
- set block 2 meter above loop-block to {@blanc}
- set block 1 meter above loop-block to {@blanc}
- if line 4 is "noir":
- wait 10 ticks
- set block 3 meter above loop-block to {@noir}
- set block 2 meter above loop-block to {@noir}
- set block 1 meter above loop-block to {@noir}
- if line 4 is "gris":
- wait 10 ticks
- set block 3 meter above loop-block to {@gris}
- set block 2 meter above loop-block to {@gris}
- set block 1 meter above loop-block to {@gris}
- if line 4 is "grisc":
- wait 10 ticks
- set block 3 meter above loop-block to {@grisc}
- set block 2 meter above loop-block to {@grisc}
- set block 1 meter above loop-block to {@grisc}
- if line 4 is "bleue":
- wait 10 ticks
- set block 3 meter above loop-block to {@bleue}
- set block 2 meter above loop-block to {@bleue}
- set block 1 meter above loop-block to {@bleue}
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is {@blocks}:
- block above loop-block is {@delvitre}
- wait 10 ticks
- set block 3 meter above loop-block to air
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- if line 2 is "barriere2":
- if line 3 is "Fermer":
- set line 3 to "Ouvrir"
- loop blocks in radius {@rayon} around event-block:
- loop-block is cobblestone:
- wait 10 ticks
- set block 2 meter above loop-block to fence
- set block 1 meter above loop-block to fence
- stop
- if line 3 is "Ouvrir":
- set line 3 to "Fermer"
- loop blocks in radius {@rayon} around event-block:
- loop-block is cobblestone:
- block above loop-block is fence
- wait 10 ticks
- set block 2 meter above loop-block to air
- set block 1 meter above loop-block to air
- stop
- on break:
- if player's gamemode is survival:
- if block is {@delvitre}:
- loop blocks in radius {@rayon} around event-block:
- loop-block is sign:
- if line 1 of loop-block is "&e[Porte]":
- cancel event
- command /modoporte <text> <text>:
- permission: sk.modo
- trigger:
- if arg 1 is "add":
- if arg 2 is set:
- add arg 2 to {x_porte_.owner.%location of targeted block%::*}
- else:
- send "{@logo}&4Vous devez indiquez un joueur"
- if arg 1 is "del":
- if arg 2 is set:
- remove arg 2 from {x_porte_.owner.%location of targeted block%::*}
- else:
- send "{@logo}&4Vous devez indiquez un joueur"
- command /porte <text> [<text>]:
- trigger:
- if targeted block is a sign:
- if line 1 of targeted block is "&e[Porte]":
- if arg 1 is "add":
- if player has permission "sk.modo":
- add arg 2 to {x_porte_.allow.%location of targeted block%::*}
- send "{@logo}&e%arg 2% &9 a été ajouté sur cette porte"
- else if {x_porte_.owner.%location of targeted block%::*} contains player:
- add arg 2 to {x_porte_.allow.%location of targeted block%::*}
- send "{@logo}&e%arg 2% &9 a été ajouté sur cette porte"
- else:
- send "{@logo}&9Tu n'es pas le propriétaire de cette porte. Tu ne peux pas ajouter de joueurs."
- if arg 1 is "del":
- if player has permission "sk.modo":
- remove arg 2 from {x_porte_.allow.%location of targeted block%::*}
- send "{@logo}&e%arg 2% &9 a été supprimé sur cette porte"
- else if {x_porte_.owner.%location of targeted block%::*} contains player:
- remove arg 2 from {x_porte_.allow.%location of targeted block%::*}
- send "{@logo}&e%arg 2% &9 a été supprimé sur cette porte"
- else:
- send "{@logo}&9Tu n'es pas le propriétaire de cette porte. Tu ne peux pas supprimer de joueurs."
- if arg 1 is "list":
- if player has permission "sk.modo":
- send "{@logo}&ePropriétaire: &9%{x_porte_.owner.%location of targeted block%::*}%"
- send "{@logo}&eListe des joueurs autorisés: &9%{x_porte_.allow.%location of targeted block%::*}%"
- else if {x_porte_.owner.%location of targeted block%::*} contains player:
- send "{@logo}&eListe des joueurs autorisés: &9%{x_porte_.allow.%location of targeted block%::*}%"
- else:
- send "{@logo}&9Tu n'es pas le propriétaire de cette porte. Tu ne peux pas voir la liste des joueurs allow."
- on sign change:
- if line 1 is "[Porte]":
- if line 2 is "":
- set line 1 to "&e[Porte]"
- set line 2 to "2"
- set line 3 to "Fermer"
- add event-location to {x_porte_.owner.%event-location%::*}
- add player to {x_porte_.owner.%event-location%::*}
- add player to {x_porte_.allow.%event-location%::*}
- send "{@logo}&9Le panneau a été créer"
- on break:
- if block is a sign:
- if line 1 is "&e[porte]":
- if {x_porte_.owner.%event-location%::*} doesn't contain player:
- cancel event
- send "{@logo} &4Tu ne peux pas détruire une porte qui ne t'appartiens pas."
- else:
- delete {x_porte_.owner.%event-location%::*}
- delete {x_porte_.allow.%event-location%::*}
- send "{@logo}&9Le panneau a été supprimé"
- on sign change:
- if line 1 is "[Porte]":
- if line 2 is "2":
- set line 1 to "&e[Porte]"
- set line 3 to "Fermer"
- set {_loc} to location of event-block
- set {_x} to single value "x" get of "../../Porte/Liste.yml"
- set {_y} to single value "y" get of "../../Porte/Liste.yml"
- set {_z} to single value "z" get of "../../Porte/Liste.yml"
- set x-location of {_loc} to {_x} parsed as number
- set y-location of {_loc} to {_y} parsed as number
- set z-location of {_loc} to {_z} parsed as number
- broadcast "%{_loc}%"
- add "%player%" to yaml list "%event-location%.owner" from file "../../Porte/Liste.yml"
- add "%player%" to yaml list "%event-location%.allow" from file "../../Porte/Liste.yml"
- send "{@logo}&9Le panneau a été créer"
- command /test <text>:
- trigger:
- delete folder "../../Porte/Liste.yml"
- on sign change:
- if line 1 is "[Porte]":
- if line 2 is "3":
- set line 1 to "&e[Porte]"
- set line 3 to "Fermer"
- add event-location to {x_porte_.owner.%event-location%::*}
- add player to {x_porte_.owner.%event-location%::*}
- add player to {x_porte_.allow.%event-location%::*}
- send "{@logo}&9Le panneau a été créer"
- on sign change:
- if line 1 is "test":
- set line 3 to "Fermer"
- on leftclick on a sign:
- if line 1 is "&e[Porte]":
- wait 2 ticks
- if player's tool is black dye:
- set line 4 to "noir"
- if player's gamemode is survival:
- remove 1 black dye from player
- if player's tool is gray dye:
- set line 4 to "gris"
- if player's gamemode is survival:
- remove 1 gray dye from player
- if player's tool is light gray dye:
- set line 4 to "grisc"
- if player's gamemode is survival:
- remove 1 light gray dye from player
- if player's tool is Lapis Lazuli:
- set line 4 to "bleue"
- if player's gamemode is survival:
- remove 1 Lapis Lazuli from player
- if player's tool is white dye:
- set line 4 to "blanc"
- if player's gamemode is survival:
- remove 1 white dye from player
- on break a sign:
- if player's gamemode is creative:
- if line 1 is "&e[Porte]":
- if player's tool is black dye:
- cancel event
- if player's tool is gray dye:
- cancel event
- if player's tool is light gray dye:
- cancel event
- if player's tool is Lapis Lazuli:
- cancel event
- if player's tool is white dye:
- cancel event
- #==================================================
- #on rightclick on a sign:
- # if line 1 is "&e[Porte]":
- # if "%owner of region at player%" or "%members of region at player%" contains "%player%":
- # if line 2 is "barriere2":
- # if line 3 is "Fermer":
- # set line 3 to "Ouvrir"
- # loop blocks in radius {@rayon} around event-block:
- # loop-block is cobblestone:
- # wait 10 ticks
- # set block 2 meter above loop-block to fence
- # set block 1 meter above loop-block to fence
- #
- # stop
- # if line 3 is "Ouvrir":
- # set line 3 to "Fermer"
- # loop blocks in radius {@rayon} around event-block:
- # loop-block is cobblestone:
- # block above loop-block is fence
- # wait 10 ticks
- # set block 2 meter above loop-block to air
- # set block 1 meter above loop-block to air
- # stop
- on load:
- if folder "plugins/Porte" doesn't exists:
- send "&e&lLe dossier plugins/Porte n'existe pas !" to console
- send " &aCréation du dossier en cours..." to console
- create folder "plugins/Porte"
- send "&2Dossier créer" to console
Advertisement
Add Comment
Please, Sign In to add comment