CraftKit | Spigot 1.2.1

Utility kit for Spigot and Bungeecord plugins | GUI, NPC, NBT, Skin and more

  1. anhcraft
    Native Minecraft Version:
    Legacy (< 1.13)
    Tested Minecraft Versions:
    • 1.9
    • 1.12
    • 1.15
    • 1.16
    Source Code:
    https://github.com/anhcraft/CraftKit
    What is this? CraftKit is a utility kit aims to speed up the development time. With this library, the developers don't have to write duplicated codes or concerns about multi-version support.

    Check out the Bungeecord version here:

    This one is optional, only download if your plugins require.
    https://repo.anhcraft.dev/service/rest/repository/browse/mvn/dev/anhcraft/craftkit.bungee/

    #Support

    Discord: https://discord.gg/MsZ8qed

    #Manual


    If you are a server owner:
    Simply put this library into your server's plugin folder. Your server must have an Internet connection for this library to download internal modules.
    Will it have any significant impacts on my server? Well no, as you see this is just a library, without actual functions, only provided for the developers. But in case you see any issues, feel free to contact me for that.
    Configdoc: https://anhcraft.dev/cd/craftkit/
    Command: /ck (or /craftkit)

    If you are a developer and want to use this library for private/public, or even commercial purposes:
    Download the jar and import it into your IDE.
    Notice: It is not recommended to use CraftKit as a shaded-dependency. Your clients must install it to their servers.

    Javadoc: https://anhcraft.dev/jd/craftkit/spigot

    Bundled libraries/frameworks:
    - ACF (Annotation command framework)
    - JvmKit (by me)
    - ConfigHelper (by me)

    - JetBrains java annotations


    Example:
    You can look here to know the basic usages of this library.
    Code (Java):
    var itemStack = new ItemBuilder(Material.PAPER).name("&aVoucher").lore("&aRight-click to receive &b10 coins").build();
    Code (Java):
    var gameProfile = new GameProfileBuilder("anhcraft");
    NPC.spawn(gameProfile, location).addViewer(player);
    Code (Java):
    ItemNBTHelper helper = ItemNBTHelper.of(skull);
    helper.setSkin(Skin.MHF_CAKE);
    skull = helper.save();
    Code (Java):
    BungeeUtil.changeSkin("anhcraft", new Skin(value, signature));
    Code (Java):
    @EventHandler
    private void jump(PlayerJumpEvent event){
        if(JUMP_COUNT.containsKey(event.getPlayer())) JUMP_COUNT.get(event.getPlayer()).incrementAndGet();
        else JUMP_COUNT.put(event.getPlayer(), new AtomicInteger(1));
    }
    Code (Java):
    SpigetApiUtil.getResourceLatestVersion("39007");
    Code (Java):
    var root = CompoundTag.of(itemStack);
    var tag = root.getOrCreateDefault("tag", CompoundTag.class);
    tag.put("custom_tag", new IntTag(1));
    root.put("tag", tag);
    itemStack = root.save(itemStack);
    Code (Java):
    // init the extension here!
    // CraftExtension.of(<YOUR PLUGIN'S MAIN CLASS>)
    private CraftExtension extension;

    public void open(Player player){
        CustomGUI cg = extension.createCustomGUI(null, 45, ChatUtil.formatColorCodes("&aRainbow &fInventory"));
        InventoryUtil.fillAll(cg, new ItemBuilder(Material.APPLE)
                .name("&a")
                .build());
        cg.addContentCallback(SlotCallback.PREVENT_MODIFY);
        cg.addContentCallback(new SlotCallback() {
            @Override
            public void click(InventoryClickEvent event, Player player, BaseGUI gui) {
                InventoryUtil.fillAll(cg, new ItemBuilder(RandomUtil.pickRandom(MaterialUtil.getStainedGlassPaneTypes())).name("&a").build());
                player.damage(0.0001);
            }
        });
        player.openInventory(cg);
        // another_player.openInventory(cg);
    }
    Code (Java):
    // init the extension here!
    // CraftExtension.of(<YOUR PLUGIN'S MAIN CLASS>)
    CraftExtension extension;
    AnvilGUI ag = extension.createAnvilGUI(player, "Title");
    ag.setItem(AnvilSlot.INPUT_LEFT, new ItemStack(Material.EMERALD, 1), SlotCallback.PREVENT_MODIFY);
    ag.setItem(AnvilSlot.OUTPUT, new ItemStack(Material.EMERALD, 1), SlotCallback.PREVENT_MODIFY, new SlotCallback() {
        @Override
        public void click(InventoryClickEvent event, Player player, BaseGUI gui) {
            System.out.println(((AnvilGUI) gui).getInputText());
        }
    });
    // the GUI is opened automatically! (only for one player)
    Code (Java):
    // init the extension here!
    // CraftExtension.of(<YOUR PLUGIN'S MAIN CLASS>)
    CraftExtension extension;
    ArmorStand as = ArmorStand.spawn(player.getLocation());
    as.setArms(true);
    as.setEquipment(EquipmentSlot.HEAD, new ItemStack(Material.IRON_HELMET, 1));
    as.setEquipment(EquipmentSlot.HAND, new ItemStack(Material.DIAMOND_AXE, 1));
    TrackedEntity<ArmorStand> te = extension.trackEntity(as);
    te.setViewDistance(5);
    te.addViewer(player);

    Maven:

    HTML:
    <relocations>
        <relocation>
            <pattern>co.aikar.commands</pattern>
            <shadedPattern>dev.anhcraft.craftkit.acf</shadedPattern>
        </relocation>
        <relocation>
            <pattern>dev.anhcraft.confighelper</pattern>
            <shadedPattern>dev.anhcraft.craftkit.helpers.config</shadedPattern>
        </relocation>
    </relocations>
    BioMine, ChaoSKiz, ANDREI923 and 11 others like this.

Recent Updates

  1. CK v1.2.1
  2. CraftKit v1.2.0
  3. CK v1.1.9

Recent Reviews

  1. Long
    Long
    5/5,
    Version: 1.1.7
    Thank This Help Me Save A lot Of Time :)
    Lib Tiet Kiem Nhieu Thoi gian viet code Tiec la Trinh Viet Code cua Toi kem qua' Gioi Tre Gio Gioi that
  2. EnityStaller
    EnityStaller
    5/5,
    Version: 1.0.7
    Good api to make the plugins
    Tks for your plugins
    Nice library
    5 star
    =========================
  3. Roy7885
    Roy7885
    5/5,
    Version: 1.0.5
    Great! Great! Great! Great! Great! Great! Great! Great! Great! Great! Great! Great!
    Vietnamese:
    hmm tui kia gat' vc
  4. CaoTrongThang
    CaoTrongThang
    5/5,
    Version: 1.0.4
    Best plugin i very used, hope rainbow siege six plugin will coming soon..................
    1. anhcraft
  5. kingred123
    kingred123
    2/5,
    Version: 1.0.3
    this is awesome
    ----------------------------------------------------
    VN: API như cc eo sai dc gì
    1. anhcraft
      Author's Response
      ngu thi s biet xai :')
  6. Thitz
    Thitz
    5/5,
    Version: 1.0.0-SNAPSHOT
    this is awesome
    ------------------------------------------------------------------------
    VN: plugin nhu con cac tao, xoa me di
    1. anhcraft
  7. hitsu
    hitsu
    5/5,
    Version: 1.8.3
    this is awesome
    ------------------------------------------------------------------------
  8. PinUsagii
    PinUsagii
    5/5,
    Version: 1.8.0
    vn: plugin nhu cac vay, xoa di
    english: this plugin very good for my project. It help me alot, thank you for creating amazing plugin.
    100 charts
    1. anhcraft
  9. XinxCode
    XinxCode
    5/5,
    Version: 1.7.7
    This save my project....
    Thanks mate
    hope you will keep it up.
    +++++++++ 10/10 +++++++++++
    1. anhcraft
  10. ghhghg
    ghhghg
    5/5,
    Version: 1.7.5
    Great lib for developer.
    I hope you will make the Inventory GUI
    ------++++------
    1. anhcraft
      Author's Response
      Already had it
      Use InventoryManager for creating GUI