SpigotAdditions [1.13-1.19.4] icon

SpigotAdditions [1.13-1.19.4] -----

Spigot library aiming to make painful tasks enjoyable and save developer's time!



Server owners, this is a Spigot library, it does nothing on it's own, it's used for helping other developers in various ways to help them develop their plugins, and may be the base of my own future plugins!

SpigotAdditions is a library providing awesome features and APIs for plugin development, and aims to save a bunch of time and get rid of boilerplate ugly code!

Best features of SpigotAdditions include:
  1. Automatic Listener + Handler API
  2. Custom Command API
  3. Custom Enchantment API
  4. ItemStackBuilders
  5. GUI Creation API/Tools
  6. Custom Item API and Player Head API
  7. MySQL Tools and MongoDB API/Tools
  8. Updater API
  9. Serealizers (Custom + ItemSerealizer for JSON and YAML)
  10. Config and DataFile API
  11. Event Flows!
  12. ChatMessage API with custom click events!
For documentation, more information and a way to integrate this library in your own plugin, visit the GitHub page!
The below code snippets are probably outdated, to view all the cool new features and the actual up-to-date snippets, visit the GitHub page linked above!

If you face any issues, post a GitHub issue, or send me a Discord friend request on: ImDaMilan#3333

A few code examples:
Code (Java):
public static @Listener void onPlayerJoin (PlayerJoinEvent event ) {
    event. getPlayer ( ). sendMessage ( "Hello!" ) ;
}
^ The Listener annotation that automatically registers the listener/handler for you, and doesn't require you to put it in a Listener class.

Code (Java):

ItemStack item = new ItemStackBuilder (Material. BOOK )
    . name ( "Test" )
    . lore ( "Test" )
    . amount ( 1 )
    . modelData ( 1 )
    . enchant (Enchantment. DURABILITY, 1 ) ;

new CustomItem (item, "plugin_name:test_custom_item", PLUGININSTANCE ) ;

CustomItem. isCustomItem (item, PLUGININSTANCE ) ;

ItemStack head = new PlayerHeadItem (player ). get ( ) ;
 
^ The Custom Item API, Player Head API and ItemStackBuilder examples.

Code (Java):
@Command (
  name = "test",
  permission = "test.test",
  usage = "/test",
  description = "Testing command",
  aliases = { "t", "testcommand" },
  minArgs = 0,
  playerOnly = false,
  consoleOnly = false
)
public class TestCommand {
  public static boolean execute (CommandSender sender, Command command, String label, String [ ] args ) {
    sender. sendMessage ( "Test command executed!" ) ;
    return true ;
    }
}
 
^ Command annotation automatically registers the custom command without having to put it in the config.yml, and provides some command QoL features!

Code (Java):
new EnchantmentWrapper ( "telekinesis", "Telekinesis", 1, false, false, EnchantmentTarget. TOOL ) ;

SQLConnection sql = new SQLConnection (host, port, database, name, pass ) ;
sql. execute ( "CREATE TABLE IF NOT EXISTS tablename" ) ;
sql. forEach ( "GET * FROM db", result -> System. out. println (result ) ) ;
sql. getResults ( "GET * FROM db" ) ;
sql. getConnection ( ) ;
sql. close ( ) ;

Updater updater = new Updater (PLUGININSTANCE, RESOURCEID ) ;
String latestVersion = updater. getLatest ( ) ;
updater. download ( ) ; //automatically downloads the newest version!
 
^ Examples for the Custom Enchantment API that automatically registers the enchant with just that single constructor), the MySQL Tools API and the Updater API.

[​IMG]
If you are interested in quality server hosting, clicking the above image supports me as a developer and gives you a 25% discount on server hosting!​
Resource Information
Author:
----------
Total Downloads: 1,962
First Release: Oct 26, 2022
Last Update: Feb 11, 2023
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings