This is a maintained version of Arnuh's ArmorEquipEvent including some bug fixes and a proper maven artifact.
The latest version is available on Maven Central:
<dependency>
<groupId>com.jeff-media</groupId>
<artifactId>armor-equip-event</artifactId>
<version>1.0.3-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
Please note that you must also shade and relocate the artifact:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<relocations>
<relocation>
<pattern>com.jeff_media.armorequipevent</pattern>
<shadedPattern>YOUR.PACKAGE.NAME.armorequipevent</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
To use the ArmorEquipEvent, you first have to register the Listener, for example in your onEnable() method:
import com.jeff_media.armorequipevent.ArmorEquipEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
ArmorEquipEvent.registerListener(this);
}
}
You can now listen to this event, cancel it or change the equipped armor.
Javadocs are available here: https://hub.jeff-media.com/javadocs/armorequipevent
The following things have changed since the latest version of Arnuh's original ArmorEquipEvent:
My CustomBlockData library provides a PersistentDataContainer for every block in your world - easily save EVERY information you like inside blocks, without any external storage needed!
Adds a ton of new PersistentDataTypes to use with Bukkit's PersistentDataContainer.
Powerful UpdateChecker for your plugins, with only one line of code.
If you need help, feel free to join my Discord server and head to #programming-help:
If you are using this project in your paid plugins, or if you just want to buy me a coffee, I would be happy over a small donation :)