RpgItemAPI
RpgItemAPI
This plugin does nothing on its own, you need to include it in your coding project!
Makes the creation of new RPG-themed items easier, using 1 simple line of code.
To use it, follow these simple steps:
- right click your project, go to "properties"
- select Java Build Path
- click "Add External Jar" and select the RpgItemAPI file
- see the example below
Example:
RpgItemAPI api = new RpgItemAPI(); //Register the api ArrayList<String> lore = new ArrayList<String>(); //Create an ArrayList for the lore lore.add("Miau!"); //Add something to the lore. (Every new .add is a new lore-line) api.createItem(e.getPlayer(), "Kitten's Longsword", Material.IRON_SWORD, ChatColor.RED, lore, Enchantment.KNOCKBACK, 9);
This simple code will give the player logging in an item with an ironsword with the red name "Kitten's Longsword", enchanted with Knockback IX and the lore "Miau!"
@Reynergodoy
This api was made for rpg-themed items, and it would take you ~ 7 lines of code to do it without, causing your workspace to be messy
wat? thats not easier to do: @EventHandler public void playerJoinReceiveItem(PlayerJoinEvent e) {
p.getInventory..... }
??