Warning
Simple & Lightweight library to allow the usage of the Builder Design Pattern for simple Spigot & Paper Components.
repositories {
mavenCentral()
maven {
name = "AtlasRepo"
url = 'https://repository.atlasworld.fr/repository/maven-public/'
}
}
dependencies {
implementation "be.raft.crafty:crafty-builder:${minecraft_version}-${crafty_version}"
}
Define minecraft_version
and crafty_version
in your gradle.properties file,
or simply replace them with the correct version.
Versions available here
<repositories>
<repository>
<id>AtlasRepo</id>
<url>https://repository.atlasworld.fr/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>be.raft.crafty</groupId>
<artifactId>crafty-builder</artifactId>
<version>minecraft_version-crafty_version</version>
</dependency>
</dependencies>
Replace minecraft_version
and crafty_version
with the correct version.
Versions available here
See Test Plugin for examples. Code is fully documented, see the javadoc for method listing.
public static final ItemStack MY_CUSTOM_ITEM = new ItemBuilder(new ItemStack(Material.STICK))
.displayName("My Custom Item")
.amount(10)
.setLore("This is the first line!", "This is the second line!")
.build();
public static final ItemStack POTION_ITEM = new ItemBuilder(new ItemStack(Material.POTION))
.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 20*30, 0))
.mainEffect(PotionEffectType.SPEED)
.build();
Anybody can contribute by opening a pull request. I would really appreciate if you want to make this code base better! I don't have any code guidelines, I will just ask you to fully document your code.