tvheeAPI 1.4

An API to help you with coding bukkit/spigot and bungeecord plugins

  1. tvhee
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Sorry, the website (with JavaDoc) is currently offline! Reason: Reported for abuse. To remember: I never post malicious content! If you are downloading one of my plugins which require this API just download as normal, for you nothing changed

    Plugin Summary:

    An API to help you with creating bukkit/spigot and bungeecord plugins. I have created many classes to use this API in my own plugins, but you may also use this API

    Supported Verions:
    This version has support for:
    - CustomMOTD V2.0
    - ChatRadius V2.5
    - CustomItems V1.3 + V1.4

    - The newest version from one of my plugins should also be compatible with the newest API version.
    - Are you looking for support for an older version? Look in the version history

    Important Information:
    Sever Owners:
    If you are linked to this API because a plugin requires this API to work, just download this API as a normal plugin and put it in your plugins folder.

    Developers:
    - Take care of the correct imports! Do not import BungeeCord classes in Bukkit!
    - If you are using this API you MUST link to this download page!
    - Please read the JavaDoc before asking questions

    Ask me for:
    - Reporting bugs
    - Questions and feature requests
    - Plugin requests
    - Help with this API if you can't find out something
    You can send me messages on Spigot or join my
    Discord server!


    How to work with this API:
    To start using this API go to your IDE and add this plugin to your buildpath (like you do with Spigot/Bukkit or BungeeCord

    You could find the JavaDoc here

    Class Info:
    me.tvhee.api.bukkit.gui.IconMenu
    Used the class from nisovin here

    me.tvhee.api.bukkit.items.ItemBuilder
    Used this util from NonameSL

    me.tvhee.api.bukkit.reflection.ReflectedObject
    Used this util from retrodaredevil

    me.tvhee.api.bukkit or bungeecord.files.ConfigManager
    WARNING: If you want to use this class you have to create the file in your buildpath and then you could call the setup method as first


    me.tvhee.api.bukkit or bungeecord.files.FileCreator
    WARNINGS:

    - If you want to use this class you have to create the file in your buildpath and then you could call the setup method
    - Do not use this class for creating config files!

    me.tvhee.api.bukkit.items.DurabilityManager
    WARNING: The ItemStack has to be an tool!


    Important method info:
    (void) me.tvhee.api.bukkit.crafting.CraftingManager.registerRecipe(...)
    Input the HashMap<Integer, ItemStack> like this:
    (This is the crafting table)
    0|1|2
    3|4|5
    6|7|8

    If you don't put null if a squre isn't used it will cause errors!

    new me.tvhee.api.bukkit.gui.IconMenu (...)
    To setup a new gui create a method like this:
    Code (Java):
    public IconMenu menu()
    {
        IconMenu menu = new IconMenu(ChatColor.AQUA + "name", slots (use anything which is divisible by 9)
    , new IconMenu.OptionClickEventHandler()
        {
            @Override
            public void onOptionClick(IconMenu.OptionClickEvent e)
            {
                Player player = e.getPlayer();
                if(e.getPosition() == <slot>)
                {
                    //Do something
                    //This code under this will close the menu
                    e.setWillClose(true);
                    e.setWillDestroy(true);
                }
    //Use any number as slot, remember that slot counting is from left to right and starts with 0
                else if(e.getPosition() == <slot>)
                {
                    //Do something else
                    //This code under this will close the menu
                    e.setWillClose(true);
                    e.setWillDestroy(true);
                }
            }
    //Use any instance of your main as plugin
        }, plugin)
    //Use any slot to set option, remember: counting starts with 0
    //Everything you set by .setOption will be visible as item in the menu
                .setOption(<slot>, new ItemStack(Material.LIGHT_BLUE_STAINED_GLASS_PANE, 1), <name>, <lore>)
        return menu;
    }
    To open the menu call: menu.open(player)

    new me.tvhee.api.bukkit.items.ItemBuilder (...)
    How to start:
    Code (Java):
    new ItemBuilder(Material material, Integer amount).setName(String name).setLore(List<String> lore)

    //You could add the following things (Just add then after the other in the same line)

    .addUnsafeEnchantment(Enchantment enchantment, int level)

    .removeEnchantment(Enchantment enchantment)

    .setSkullOwner(String owner) //Use the name of the player you want as owner, only working if you creating a skull

    .addEnchant(Enchantment enchantment, int level)

    .addEnchantments(Map<Enchantment, Integer> enchantments)

    .setInfinityDurability() //Makes it unbreakable

    .setLore(String... lore)
    //or you could use
    .setLore(List<String> lore)

    .removeLoreLine(String line)

    .removeLoreLine(int index)

    .addLoreLine(String line)
    //Or
    .addLoreLine(String line, int position)

    .setDyeColor(String color) //Only if it's a dye, had to change that method so not 100 sure if it's working

    .setWoolColor(String color) //Had also to change that method a bit, only working with wool

    .setLeatherArmorColor(Color color) //Only working with leather armour

    //You have to call this as last! Also do not forget to call it!
    .toItemStack();

Recent Updates

  1. V1.4 Released
  2. V1.3 Released
  3. V1.2 Released