[Plug-in] BANK back-end plug-in

  • A (mostly) back-end banking plug-in, i.e. a plug-in which does quite little of visible to the player and rather provides services for other plug-ins to use. Only one copy of the back-end plug-in needs to be present in a RW copy (MP or SP) and all other plug-ins can 'use' it if they need it.


    It is an example of a simple implementation of the Banking Interface, presented in this thread, and modelling the concept of a Bank in which each player of a (MP or SP) server has an account (with an optional initial amount); other plug-ins, by calling the public methods defined in the interface, can access its various services. So far, the following are implemented:


    *) query the currency name and symbol
    *) query the balance of an account
    *) query the availability of a certain sum on a certain account
    *) grant money to a player (if admin)
    *) transfer money from a player to another
    *) as all transaction are logged, ask for a 'bank statement' over a certain period of time


    The name of the currency and its symbol as well as the initial amount granted to new players can be configured for each RW copy.


    The basic idea: See the thread quoted above for more details about the very idea of a Bank Interface. Other plug-in, providing a money system can rely in the same Bank Interface to provide similar (or more!) services in a way which consumer plug-ins (plug-ins needing some money services) can use for their purposes.


    An example of a consumer plug-in (i.e. a plug-in using these services, if available) can be found here.
    ____________________


    Version 0.2.0:


    Player-side the plug-in provides only a minimum of interface, with a main menu activated with the /bank chat command:



    where the player can ask:
    - his current account balance
    - the bank statement over a period of time:



    - transfer money to another player:



    - if an admin, grant money to a player (from the "World Treasure"; screen similar to the above)
    ____________________


    Important - Important - Important - Important:



    In order to work the plug-in requires the GUI back-end plug-in 0.4.0 available here. Install it at the same time of (or before) installing this plug-in or the server will crash at start-up!
    ____________________


    Version 0.2.0:
    *) Added bank statement
    *) Fixed localised string mismatch
    *) Upgraded to RWGui 0.4.0, including window 'display stack'

  • whoops Have my own money system, Mine unfourtueatly has toe be integrated with the main Plugin

    All money system are likely to have to be integrated with a main plug-in.


    This is exactly the purpose of a back-end plug-in: the main plug-in establishes its own policies, interacts with the users and, when it needs a 'bank operation', it calls the relevant method of the bank plug-in which does the low level work (persistent accounts, low-level data base access, consistency checks, ...).


    Then, of course, everyone is free to make his own decisions.

  • It is supposed to work. Did you install the GUI plug-in too? As stated in big letters above, this plug-in will not work without the other.


    A more detailed error message (there should be one in the server log) and a list of steps you did before the error came up would help in diagnosing...

  • i did a clean install, and yes, I have Both installed

    The bank and the GUI plugin are the only two plugins i have installed.

  • i did a clean install, and yes, I have Both installed

    Code
    Error details:
    LoadingState: Error while loading singleplayer game
    pluginapi.PluginException: No 'plugin.yml' definition file found for plugin "PluginAPI.jar"![...]

    I never met this error, but it looks like you have 'installed' also the built-in PluginAPI.jar as it was a plug-in, but it isn't and it should not be placed in the plugins folder.


    This error happened while loading a SP world. I mostly test my plug-ins in MP. However, I just re-checked this plug-in in SP and it works.


    This seems different from the error you quoted above, which seems an error reported in the chat window while doing some operation


    (Incidentally, I noticed a bug which outputs the wrong message for the "Balance" feature; this does not generate an error however, or a crash, only a wrong output; I'll fix it ASAP).

    The bank and the GUI plugin are the only two plugins i have installed.

    Sure? As per the above, there seems to be something strange with PluginAPI.jar.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!