Resource [1.13] RLib - Databases, GUI Menus (pages), Configs (JSON), Commands, MORE.

Discussion in 'Spigot Plugin Development' started by JustRayz, Jul 11, 2018.

  1. RLib is a library for spigot development including many useful features. I am open to requests for further additions :). This library is powerful and speeds up development rapidly, allowing you to create features that would usually take a while.

    A few of the features are statistic tracking. Statistic tracking includes: TPS; Checking players with certain permissions; Checking how many OPs there are. This section needs to be expanded massively, any suggestions please tell me.

    Another package is called ‘chat’. This includes easily creating messages using the TextFormatter to create clickable and hoverable measages in one/two lines. It also includes a configuration for messages in multiple languages with ease. Furthermore, it allows you to format messages from your configuration by having indexed arguments and keyed arguments, e.g. ${name} or ${4}.

    ‘datamanagement’ is a further package, this allows you to easily manage configurations and databases with ease. Regarding configurations, you can create as many as you want, with object management handled for you, in Yaml or Json format. The RDatabaseManager class allows you to manage any database (asynchronously) that Java has a driver for, including MySQL & SQLite. You can use any database type, so long as you know the driver name and class name, however I have an enumeration for MySQL, SQLite, Postgres. The database class also allows you to input your java object directly into the database using an interface called DatabaseSerialisable!

    Finally, for now, there is a package called ‘inventory’. In my opinion, perhaps the most useful. This package allows you to create GUI Menus, with multiple pages, and easily create inventories. These inventories also allow you to create events, tied DIRECTLY to the inventory itself!! This means you no longer have to have pesky EventHandlers. You can create these events with lambdas in java 8 as it uses a FunctionalInterface called Consumer<InventoryClickEvent>.


    To use this library, you have to get access to its jar, by using maven, and ensure that you add it to your jar’s output! If you need help with maven or building it in your jar, ask me!

    To use this library, all you have to do is register your plugin with the RHandler. Do this as follows:
    Code (Text):
    I am working on writing wiki information for each class, if I have not done it yet, look at the source code, ALL of my code intended for use is commented.

    Code (Text):

    #1 JustRayz, Jul 11, 2018
    Last edited: Aug 10, 2018
    • Like Like x 1
    • Agree Agree x 1
    • Useful Useful x 1
  2. Not working, am I doing something wrong? xD
    Edit: Dev is nice, and I got it working finally :)
    #2 dkajlw, Jul 18, 2018
    Last edited: Jul 19, 2018
  3. Updated lots of things. Also included DatabaseSerialisable interface so that you can serialise objects into your database. Maven is now using version 1.0.1
  4. I have updated the RInventoryBuilder, RMenu & RVerificationMenu to cater to 1.13. Particle formats have been completed, the HelixParticleFormat & TornadoParticleFormat have been added (new).
  5. I have added a new command interface, a method to create commands in a more OOP style. It includes a root command (PluginCommand class) and sub commands (SubCommand class). No wiki has been created as of yet however there are comments, as usual, on the code. Now on version 1.0.3