Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solarrabbit99/goathorn
Implementation of Bedrock 1.18's goat horns in Java 1.17+.
https://github.com/solarrabbit99/goathorn
Last synced: about 1 month ago
JSON representation
Implementation of Bedrock 1.18's goat horns in Java 1.17+.
- Host: GitHub
- URL: https://github.com/solarrabbit99/goathorn
- Owner: solarrabbit99
- License: gpl-3.0
- Created: 2021-08-07T06:22:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-03T11:13:42.000Z (over 2 years ago)
- Last Synced: 2024-11-08T17:55:03.302Z (3 months ago)
- Language: Java
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoatHorn
[![](https://jitpack.io/v/zhenghanlee/GoatHorn.svg)](https://jitpack.io/#zhenghanlee/GoatHorn)
[![License](https://img.shields.io/github/license/zhenghanlee/GoatHorn)](https://img.shields.io/github/license/zhenghanlee/CustomShop)
[![Spigot Downloads](http://badge.henrya.org/spigotbukkit/downloads?spigot=95113&name=spigot_downloads)](https://www.spigotmc.org/resources/%E2%AD%901-17-must-have%E2%AD%90-goathorn.95113/)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/zhenghanlee/GoatHorn)](https://img.shields.io/github/commit-activity/m/zhenghanlee/GoatHorn)
[![Discord](https://img.shields.io/discord/846941711741222922.svg?logo=discord)](https://discord.gg/YSv7pptDjE)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9e997f06079542b9996cf7c695989b9d)](https://www.codacy.com/gh/zhenghanlee/GoatHorn/dashboard?utm_source=github.com&utm_medium=referral&utm_content=zhenghanlee/GoatHorn&utm_campaign=Badge_Grade)## Introduction
The goal of this project is two-fold:
1. 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.
2. 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`.
## Maven Repository
You can add the project as your dependency by including the JitPack repository in your `pom.xml`:
```xml
jitpack.io
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):
```xml
com.github.zhenghanlee
GoatHorn
VERSION```
## Gradle Repository
You can add the project as your dependency by including the JitPack repository:
```gradle
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):
```gradle
dependencies {
implementation 'com.github.zhenghanlee:GoatHorn:VERSION'
}
```## Example
To disable player from blaring horns:
```java
@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:
```java
@EventHandler
public void onBlareHorn(PlayerBlareHornEvent evt) {
evt.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BAD_OMEN, 1, 5));
}```