byteful / LevelTools

A Spigot/Bukkit plugin that adds a leveling system to tools, swords, and bows. https://discord.gg/G8BDgqsuyw
GNU Affero General Public License v3.0
13 stars 6 forks source link

Java CI with Gradle Discord

SpigotMC: https://www.spigotmc.org/resources/leveltools-rpg-item-leveling.97516/
Support/Help Server: https://discord.gg/G8BDgqsuyw
WIKI: https://github.com/byteful/LevelTools/wiki

Logo

A plugin that adds a leveling system to tools, swords, and bows.

Features

Developer API

Gradle:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    compileOnly 'com.github.byteful:LevelTools:Tag' // Replace Tag with the version. (Ex: v1.4.0)
}

Maven:


<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.byteful</groupId>
    <artifactId>LevelTools</artifactId>
    <version>Tag</version> <!-- Replace Tag with the version. (Ex: v1.4.0) -->
</dependency>

Example Usage:

// Items

ItemStack hand = player.getInventory().getItemInMainHand();
LevelToolsItem tool = LevelToolsUtil.createLevelToolsItem(hand);
tool.setLevel(69);
tool.setXp(420);
player.getInventory().setItemInMainHand(tool.getItemStack());

// Events

@EventHandler
public void onLevelEvent(LevelToolsLevelIncreaseEvent event) {
  event.setNewLevel(69);
}

@EventHandler
public void onXPEvent(LevelToolsXPIncreaseEvent event) {
  event.setNewXp(420);
}