Alors bonjour à tous, un ami est en train de créer un plugin de modération et il a un problème sur son code, en fait il a créer un système de language comme sur CTL Serv, sauf qu'il y a un soucis quand par exemple il passe en anglais le code ne vérifie pas qu'il est en anglais ou français il prend le français même si le joueur est en anglais j'éspère que vous aurais compris, voici les codes:
If {VizModerator.%player%} is false:
If {VizModerator.%player%.Lang/French} is true:
Set {VizModerator.%player%} to true
Set {VizModerator.%player%.Helmet} to player's helmet
Set {VizModerator.%player%.Chestplate} to player's chestplate
Set {VizModerator.%player%.Leggings} to player's leggings
Set {VizModerator.%player%.Boots} to player's boots
Set {VizModerator.Inventaire.%player%} to player's serialized inventory
Clear player's inventory
Set player's gamemode to creative
Set slot 0 of player to Compass named "&bCompass"
Set slot 1 of player to Book named "&bView Inventory"
Set slot 2 of player to Wooden Axe named "&bHache WorldEdit"
Set slot 4 of player to Cyan Carpet named "&bMeilleure Vue"
Set slot 7 of player to Cyan Dye named "&bOptions"
Set slot 8 of player to Wait Music Disc named "&bTéléportation Aléatoire"
Hide player to all players
Apply potion of speed to the player for 999 days
Send "&8[&bVizModerator&8] &7>> &aActivé !" to player
Stop
Else:
If {VizModerator.%player%.Lang/French} is true:
Set {VizModerator.%player%} to true
Set {VizModerator.%player%.Helmet} to player's helmet
Set {VizModerator.%player%.Chestplate} to player's chestplate
Set {VizModerator.%player%.Leggings} to player's leggings
Set {VizModerator.%player%.Boots} to player's boots
Set {VizModerator.Inventaire.%player%} to player's serialized inventory
Clear player's inventory
Set player's gamemode to creative
Set slot 0 of player to Compass named "&bCompass"
Set slot 1 of player to Book named "&bView Inventory"
Set slot 2 of player to Wooden Axe named "&bWorldEdit Axe"
Set slot 4 of player to Cyan Carpet named "&bBetter View"
Set slot 7 of player to Cyan Dye named "&bOptions"
Set slot 8 of player to Wait Music Disc named "&bRandom Teleportation"
Hide player to all players
Apply potion of speed to the player for 999 days
Send "&8[&bVizModerator&8] &7>> &aEnable !" to player
Stop
Et le code du choix de langue :
Command /VLang [<Text>]:
Permission: VizModerator.Use
Permission Message: &cTu n'as pas accès à cette commande !
Trigger:
If arg 1 is not "French" or "English":
If {VizModerator.%player%.Lang/French} is true:
Send "&9====================" to player
Send "&8- &6/VLang French &7- Définir la langue de votre VizModerator en Français." to player
Send "&8- &6/VLang English &7- Définir la langue de votre VizModerator en Anglais." to player
Send "&9====================" to player
Stop
Else:
If {VizModerator.%player%.Lang/English} is true:
Send "&9====================" to player
Send "&8- &6/VLang French &7- Set the language of your VizModerator to French." to player
Send "&8- &6/VLang English &7- Set the language of your VizModerator to English." to player
Send "&9====================" to player
Stop
If arg 1 is not set:
If {VizModerator.%player%.Lang/French} is true:
Open chest with 1 rows named "&8Choisissez une langue :" to player
Format slot 0 of player with White Stained Glass Pane to be unstealable
Format slot 1 of player with White Stained Glass Pane to be unstealable
Format slot 2 of player with White Stained Glass Pane to be unstealable
Format slot 3 of player with Light Blue Wool named "&9Français" to close then run [Make player execute command "VLang French"]
Format slot 4 of player with White Stained Glass Pane to be unstealable
Format slot 5 of player with Red Wool named "&cAnglais" to close then run [Make player execute command "VLang English"]
Format slot 6 of player with White Stained Glass Pane to be unstealable
Format slot 7 of player with White Stained Glass Pane to be unstealable
Format slot 8 of player with White Stained Glass Pane to be unstealable
Stop
Else:
If {VizModerator.%player%.Lang/English} is true:
Open chest with 1 rows named "&8Choose a language :" to player
Format slot 0 of player with White Stained Glass Pane to be unstealable
Format slot 1 of player with White Stained Glass Pane to be unstealable
Format slot 2 of player with White Stained Glass Pane to be unstealable
Format slot 3 of player with Light Blue Wool named "&9French" to close then run [Make player execute command "VLang French"]
Format slot 4 of player with White Stained Glass Pane to be unstealable
Format slot 5 of player with Red Wool named "&cEnglish" to close then run [Make player execute command "VLang English"]
Format slot 6 of player with White Stained Glass Pane to be unstealable
Format slot 7 of player with White Stained Glass Pane to be unstealable
Format slot 8 of player with White Stained Glass Pane to be unstealable
Stop
Else:
Send "&cUne erreur est survenue, veuillez choisir une langue à l'aide de la commande /VLang French ou English." to player
Stop
If arg 1 is "French":
Set {VizModerator.%player%.Lang/English} to false
Set {VizModerator.%player%.Lang/French} to true
Send "&8[&bVizModerator&8] &7>> &aLa langue de votre VizModerator a bien été set en &9Français&a." to player
Stop
If arg 1 is "English":
Set {VizModerator.%player%.Lang/French} to false
Set {VizModerator.%player%.Lang/English} to true
Send "&8[&bVizModerator&8] &7>> &aThe language of your VizModerator has been set to &cEnglish&a." to player
Stop
n