ChestCommand | Changer iConomy par un Skript de Token/coins

TheFreezyGaming

Architecte en herbe
1 Juillet 2014
42
1
73
23
Bonjour,
J'aimerais créer une boutique avec chestcommand mais le problème est dès qu'un joueur souhaite acheter un grade ça lui retire la money de iConomy et non de mon Skript de coins,
Si vous avez une idée, soit d'un plugin de coin pouvant être associé à chestcommand ou soit d'un skript qui fait ça (malgès de nombreuse recherches je n'ai rien trouvé d'efficace) où un autre solution peut-être ?

Code:
######################
#+                  +#
#   MENU SETTINGS    #
#+                  +#
######################

menu-settings:

  # name - appears as the title - REQUIRED
  name: '&1Example menu'

  # rows - the number of rows of the chest - REQUIRED
  rows: 3

  # command - OPTIONAL (you can remove this or set it to '')
  # Bind multiple commands using ; (command: 'menu; m; me')
  command: 'boutique'

  # auto-refresh - OPTIONAL
  # How frequently the menu will be refreshed, in seconds.
  # Useful if you have variables in items' descriptions.
  auto-refresh: 5

  # This command command will be execute when the menu is opened.
  # Supports all the icon command types.
  open-action: 'sound: note pling; tell: &eYou opened the example menu.'

  # open-with-item - OPTIONAL
  # The menu will open only right-clicking with orange wool [35:1]
  open-with-item:
    id: wool:1
    left-click: false
    right-click: false


######################
#+                  +#
#       ITEMS        #
#+                  +#
######################


test-from-console:
  PRICE: 30
  COMMAND:
    - 'console: bc {player} a acheté le grade artisan'
    - 'console: manuadd {player} artisan'
  NAME: '&cTEST'
  LORE:
    - 'C''est un test'
  ID: diamond
  POSITION-X: 4
  POSITION-Y: 1

Et mon skript de tokens (ou coins):
Code:
command /tokens <text> <number> <player>:
    aliases: tok
    trigger:
        if player have permission "give.coins":
            if arg 1 is "give":
                add arg-2 to {coins.%UUID of arg-3%}
                message "&6[Token] &aVous avez donné &2%arg-2% &aCoins à &2&o%arg-3%" to player
                message "&6[Token] &aVous avez reçu &2%arg-2% &aCoins" to arg 3
            else if arg 1 is "remove":
                remove arg-2 from {coins.%UUID of arg-3%}
                message "&6[Token] &4Vous avez retiré %arg-2% Coins à %arg-3%" to player
                message "&6[Token] &cVous avez été débité de &4%arg-2% &cCoins" to arg 3
        if player doesn't have permission "give.coins":
            message "&6[Token] &4Vous n'avez pas la permission d'utiliser cette commande"
            stop trigger
      

command /token:
    trigger:
        message "&6[Token] &eVous avez &a%{coins.%UUID of player%}%&e Tokens" to player
      
command /tokenview <player>:
    trigger:
        if player have permission "view.coins":
            message "&6[Token] %arg 1% a %{coins.%UUID of arg-1%}% Coins"


Cordialement, TheFreezyGaming