Aller au contenu
  • 0

[Aide] Conditions dans un GUI


Question

Posté(e)

Bonjour, pour un minijeux, j'ai eu l'idée de faire une condition à un gui, pour rejoindre une arène quand celle-ci est libre.

Voilà le skript en question:

 

 

command /join:
   trigger:           
       open chest with 2 row named "&2&lPvpBot" to player
       if {botarena.ingame} is "ingame": 
           format slot 0 of player with 35:14 named "&4Bot1" with lore "&cEn cours" to close then run "test1"
       else:
       format slot 0 of player with 35:13 named "&bBot1" with lore "&bLibre!" to close then run "test1"

Mon problème est que même quand le joueur est en jeu, le menu affiche que l'arène est libre.

4 réponses à cette question

Messages recommandés

  • 0
Posté(e)

"Mon problème est que même quand le joueur est en jeu, le menu affiche que l'arène est libre."

 

J'ai rien compris à ce que tu veux que ton code fasse. En plus tu ne nous donnes pas la partie où tu set la variable {botarena.ingame} :/

  • 0
Posté(e)
Et je vais le dire encore, et je continuerai jusqu'à ce que ça rentre dans les esprits, mais utilisez TuSKe pour vos GUI.

Cela ne change rien, mon skript ne marche pas.

ps: Ton plugin ne se load pas:

       at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_111]
       at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_111]
       at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-db6de12-18fbb24]
       at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

  • 0
Posté(e)
Bonjour, pour un minijeux, j'ai eu l'idée de faire une condition à un gui, pour rejoindre une arène quand celle-ci est libre.

Voilà le skript en question:

 

 

command /join:
   trigger:          
       open chest with 2 row named "&2&lPvpBot" to player
       if {botarena.ingame} is "ingame":
           format slot 0 of player with 35:14 named "&4Bot1" with lore "&cEn cours" to close then run "test1"
       else:
       format slot 0 of player with 35:13 named "&bBot1" with lore "&bLibre!" to close then run "test1"

Mon problème est que même quand le joueur est en jeu, le menu affiche que l'arène est libre.

Mais mec. Je te rappelle que le fait de mettre un tab a un effet dans skript...

La syntaxe de TuSKe n'est pas la même.

Avec TuSKe :

command /join:
   trigger:          
       open virtual chest inventory with size 2 named "&2&lPvpBot" to player
       if {botarena.ingame} is "ingame":
           format gui slot 0 of player with 35:14 named "&4Bot1" with lore "&cEn cours" to close then run player command "test1"
       else:
           format slot 0 of player with 35:13 named "&bBot1" with lore "&bLibre!" to close then run player command "test1"

Sans TuSKe (je recommande pas, perso):

command /join:
   trigger:          
       open chest with 2 row named "&2&lPvpBot" to player
       wait 2 ticks
       if {botarena.ingame} is "ingame":
           format slot 0 of player with 35:14 named "&4Bot1" with lore "&cEn cours" to close then run "test1"
       else:
           format slot 0 of player with 35:13 named "&bBot1" with lore "&bLibre!" to close then run "test1"

Mon problème est que même quand le joueur est en jeu, le menu affiche que l'arène est libre.

[/code]

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.