Skip to content

Utility Library to make building Spigot Components more simpler

License

Notifications You must be signed in to change notification settings

Raft08/CraftyBuilder

Repository files navigation

Crafty Builder

Warning

  • This project is no longer maintained by the Original Author (RaftDev).
  • If you have any issues or suggestions, contact the new maintainer (Artex154) or open an issue.

Simple & Lightweight library to allow the usage of the Builder Design Pattern for simple Spigot & Paper Components.

Gradle :

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

Maven :

<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

Usage:

See Test Plugin for examples. Code is fully documented, see the javadoc for method listing.

ItemBuilder

    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();

PotionBuilder

    public static final ItemStack POTION_ITEM = new ItemBuilder(new ItemStack(Material.POTION))
        .addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 20*30, 0))
        .mainEffect(PotionEffectType.SPEED)
        .build();

Contributing:

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.

About

Utility Library to make building Spigot Components more simpler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages