KREDITAPI 1.0

EconomyAPI, KreditAPI, Economy

  1. RydlosCZ
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.13
    Source Code:
    https://github.com/EncryptSL/KREDITAPI
    Contributors:
    EncryptSL
    Languages Supported:
    English
    ABOUT_PL.png
    THIS API YOU CAN USE, FOR YOUR CUSTOM ECONOMY PLUGIN OR MINIGAMES COINS.
    Plugin has commands and api.

    I developed this plugin for my server and i use this api for example using buying Crates keys or opening crates, minigames shops. and special second economy.
    Main idea is for buying real currency. Example 1 credit for 1 czech crowns or your currency . this is only example....

    Plugin must by in folder with plugins for working.

    Settings open: config.yml in plugins Write your Acess into MySQL.
    For working you must have MySQL.
    Plugin writed on HikariCP Pool, Methods from SQL_SELECTOR
    use runTaskAsync...
    Without Lag.....


    Configuration - config.yml​
    Code (YAML):
    Database:
      MySQL
    :
        DATABASE
    : 'jdbc:mysql://localhost:3306/root'
        USERNAME
    : 'root'
        PASSWORD
    : 'root'
    PluginAPI
    :
      MESSAGE
    :
        SETTINGS
    :
          PLUGIN_PREFIX
    : '&f[&aKREDITAPI&f]'
        PLAYER
    :
          ACCOUNT_NO_EXIST
    : '&cYou have no created account, Please contact Administrator of this server !'
          PLAYER_ACCOUNT_EXIST
    : '&cYour account now exist !'
          BALANCE
    : 'You have &a[kredit] &fkredits !'
          NOTIFY_ADDED_PLAYER_KREDIT
    : '&fYou recivied from &cAdmin &a [kredit] &fkredits, now your balance is &a[new_balance] &fkredits.'
          NOTIFY_SET_PLAYER_KREDIT
    : '&fAdmin set your account on value &a[kredit] &fkredits, now your balance is &a [new_balance] &fkredits'
          NOTIFY_REMOVE_PLAYER_KREDIT
    : '&fAdmin remove from your account &a[kredit] &fkredits, now your balance is &a [new_balance] &fkredits'
          NOTIFY_CREATE_PLAYER_ACCOUNT
    : '&fAdmin create your kredit account !, You can now use command /kredit !'
        ADMIN
    :
          YOU_ADD_KREDIT
    : '&b+ &fYou added &a [kredit] &fkredits for player &e[target] &f!'
          YOU_SET_KREDIT
    : '&b+ &fYou set &a [kredit] &fkredits for player &e[target] &f!'
          YOU_REMOVE_KREDIT
    : '&b+ &fYou remove &a [kredit] &fkredits from player &e[target] &faccount !'
          YOU_CREATE_KREDIT_ACCOUNT
    : '&b+ &fYou create account kredit for player &e[target]'
          PLAYER_OFFLINE
    : '&cPlayer is offline !'
        COMMANDS
    :
          NO_PERMISSIONS
    : '&cYou dont have permissions for this command !'
          MENU_COMMAND
    :
           - '&6[&4++ &e-- &aKREDITS ADMIN COMMANDS &e-- &4++&6]'
            - '&b+ &7/&bkredit &e- &5Write Main Commands'
            - '&b+ &7/&bkredit add [player|value] &e- &5Add Kredits for Player'
            - '&b+ &7/&bkredit set [player|value] &e- &5Set Kredits for Player'
            - '&b+ &7/&bkredit remove [player|value] &e- &5Remove Kredits for Player'
            - '&b+ &7/&bkredit create [player] &e- &5Create Account for Player'
            - '&6[&4++ &e-- &aKREDITS ADMIN COMMANDS &e-- &4++&6]'
          WRONG_USAGE
    :
            WRONG_FIRST
    :
              ADD_COMMAND
    : '&b+ &7/&bkredit add [&cplayer&7|&cvalue&f]'
              SET_COMMAND
    : '&b+ &7/&bkredit set [&cplayer&7|&cvalue&f]'
              REMOVE_COMMAND
    : '&b+ &7/&bkredit remove [&cplayer&7|&cvalue&f]'
              CREATE_COMMAND
    : '&b+ &7/&bkredit create [&cplayer&f]'
            WRONG_SECOND
    :
              ADD_COMMAND
    : '&b+ &7/&bkredit add [&aplayer&7|&cvalue&f]'
              SET_COMMAND
    : '&b+ &7/&bkredit set [&aplayer&7|&cvalue&f]'
              REMOVE_COMMAND
    : '&b+ &7/&bkredit remove [&aplayer&7|&cvalue&f]'

    Open Source: Click Here
    .You can help me with Dev :).


    CMD_PERMISSIONS.png

    • /kredit - Main command this is can use players.
    • /kredit admin - Show command for Admins or Operators.
    • /kredit add [player] [vault] - For add Kredits
    • /kredit set [player] [vault] - For Set Kredits.
    • /kredit remove [player] - Remove vault from Player Account kredit
    • /kredit create [player] - This command generate player account in DB.

    1. Permissions
    2. Kredit.admin.* - Default for OP. Give All Access to Commands.
    FOR_DEVS.png
    Code (Java):
    [/SIZE][/CENTER]
    [SIZE=3]private static SQL_SELECTOR kredit = new SQL_SELECTOR();

    kredit.GET_PLAYER_EXIST(UUID uuid); <- Boolean can controll exist accounts.
    kredit.GET_PLAYER_KREDIT(UUID uuid); <- Void return value from player account.
    kredit.INSERT_PLAYER(Player player, UUID uuid, int vault); <- Void insert player into DB.
    kredit.ADD_KREDIT(UUID uuid, int Value); <- void
    kredit.SET_KREDIT(UUID uuid, int Value); <- void
    kredit.REMOVE_KREDIT(UUID uuid, int Value); <- void
    kredit.NEW_BALANCE(UUID uuid, int Value); <- return int New Balance plus
    kredit.NEW_BALANCE_MINUS(UUID uuid, int Value); <- return int minus balance.