ModsJava
CraftKit | Spigot
Java mod listed for Minecraft 1.9–1.17. Download on the author's site.
⬇ Download on SpigotWhat is this?
CraftKit is a utility kit that 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.
#Manual
If you are a server owner:
Simply put this library into your server's plugin folder. Your server must have an Internet connection to allow the library to download internal modules.
Command: /ck (or /craftkit)
For servers running on Java 9+, please add the following parameter to your server startup command:
If you are a developer and want to use this library:
Repo:
Spigot side:
<dependency>
<groupId>com.github.anhcraft.CraftKit </groupId>
<artifactId>craftkit.spigot </artifactId>
<version>VERSION </version>
</dependency>
Bungeecord side:
<dependency>
<groupId>com.github.anhcraft.CraftKit </groupId>
<artifactId>craftkit.bungee </artifactId>
<version>VERSION </version>
</dependency>
Example:
You can look here to know the basic usages of this library.
#Manual
If you are a server owner:
Simply put this library into your server's plugin folder. Your server must have an Internet connection to allow the library to download internal modules.
Command: /ck (or /craftkit)
For servers running on Java 9+, please add the following parameter to your server startup command:
Code (Text):
--add-opens java.base/java.net=ALL-UNNAMED
Repo:
HTML:
<repositories>
<repository>
<id>jitpack.io </id>
<url>https://jitpack.io </url>
</repository>
</repositories>
<repository>
<id>jitpack.io </id>
<url>https://jitpack.io </url>
</repository>
</repositories>
HTML:
<dependency>
<groupId>com.github.anhcraft.CraftKit </groupId>
<artifactId>craftkit.spigot </artifactId>
<version>VERSION </version>
</dependency>
HTML:
<dependency>
<groupId>com.github.anhcraft.CraftKit </groupId>
<artifactId>craftkit.bungee </artifactId>
<version>VERSION </version>
</dependency>
You can look here to know the basic usages of this library.
Spoiler: ItemBuilder
Code (Java):
var itemStack
=
new ItemBuilder
(Material.
PAPER
).
name
(
"&aVoucher"
).
lore
(
"&aRight-click to receive &b10 coins"
).
build
(
)
;
Spoiler: Make a NPC!
Code (Java):
var gameProfile
=
new GameProfileBuilder
(
"anhcraft"
)
;
NPC. spawn (gameProfile, location ). addViewer (player ) ;
NPC. spawn (gameProfile, location ). addViewer (player ) ;
Spoiler: Set skin for skull item
Code (Java):
ItemNBTHelper helper
= ItemNBTHelper.
of
(skull
)
;
helper. setSkin (Skin. MHF_CAKE ) ;
skull = helper. save ( ) ;
helper. setSkin (Skin. MHF_CAKE ) ;
skull = helper. save ( ) ;
Spoiler: Change skin with Bungeecord
Code (Java):
BungeeUtil.
changeSkin
(
"anhcraft",
new Skin
(value, signature
)
)
;
Spoiler: Use PlayerJumpEvent to count jumps
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 ) ) ;
}
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 ) ) ;
}
Spoiler: Get latest resource version with Spiget API
Code (Java):
SpigetApiUtil.
getResourceLatestVersion
(
"39007"
)
;
Spoiler: Custom NBT Tag for ItemStack
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 ) ;
var tag = root. getOrCreateDefault ( "tag", CompoundTag. class ) ;
tag. put ( "custom_tag", new IntTag ( 1 ) ) ;
root. put ( "tag", tag ) ;
itemStack = root. save (itemStack ) ;
Spoiler: Create a GUI with callbacks!
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);
}
// 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);
}
Spoiler: Create an anvil GUI with callbacks!
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)
// 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)
Spoiler: Create a fake armor stand [Lagless]
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 ) ;
// 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 ) ;
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.9, 1.12, 1.15
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
CraftKit | Spigot is a free Minecraft Java mod. Compatible with Minecraft 1.9, 1.12, 1.15, 1.16 and newer. Downloaded 29,547 times (via Spigot). Download it and open it directly in the game.