The goal of this project is two-fold:
-
Provide a plugin that implements goat horns, which are experimental features in Bedrock edition, planned to be released on 1.18. Java edition shall have equivalent experience with the item, and we are lucky for it to be possible to be implemented in 1.17.x. The only difference is that horns are looted via killing the goat instead of making goats ramp blocks - a behaviour that has yet to be present in Java 1.17.x.
-
Provide an API for developers to decide on whether blaring a goat horn trigger any in-game events (such as raids, buff effects, summoning of mobs etc). This is possible via the introduction of
PlayerBlareHornEvent.
You can add the project as your dependency by including the JitPack repository in your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>Then after add the dependency like so (replace VERSION with the version provided by the jitpack badge located at the start of this document):
<dependency>
<groupId>com.github.zhenghanlee</groupId>
<artifactId>GoatHorn</artifactId>
<version>VERSION</version>
</dependency>You can add the project as your dependency by including the JitPack repository:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}Then after add the dependency like so (replace VERSION with the version provided by the jitpack badge located at the start of this document):
dependencies {
implementation 'com.github.zhenghanlee:GoatHorn:VERSION'
}To disable player from blaring horns:
@EventHandler
public void onBlareHorn(PlayerBlareHornEvent event) {
if (event.getPlayer().hasPermission("server.rank.example"))
event.setCancelled(true);
}Calling a raid if player is in the vacanity of a village:
@EventHandler
public void onBlareHorn(PlayerBlareHornEvent evt) {
evt.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BAD_OMEN, 1, 5));
}