mirror of
https://github.com/JEFF-Media-GbR/BetterTridents.git
synced 2024-12-28 03:17:45 +01:00
2.1.1 release
This commit is contained in:
parent
45c7d63b0a
commit
1fe40e2ffa
@ -1,3 +1,6 @@
|
||||
## 2.1.1
|
||||
- Improved void saving in 1.17+
|
||||
|
||||
## 2.1.0
|
||||
- Tridents will not be instantly returned when hitting Y=0
|
||||
- Fixed players without "bettertridents.savevoid" permissions being able to use the "void-saving" feature anyway
|
||||
|
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
<groupId>de.jeff_media</groupId>
|
||||
<name>BetterTridents</name>
|
||||
<artifactId>BetterTridents</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.1.1</version>
|
||||
|
||||
<properties>
|
||||
<spigot.prefix>${project.name}</spigot.prefix>
|
||||
@ -135,7 +135,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
||||
<version>1.17-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -19,8 +19,18 @@ public class WatchTrident extends BukkitRunnable {
|
||||
|
||||
static {
|
||||
int fieldCount = 0;
|
||||
Class<?> entityThrownTridentClass = null;
|
||||
try {
|
||||
final Class<?> entityThrownTridentClass = ReflUtil.getNMSClass("EntityThrownTrident");
|
||||
entityThrownTridentClass = ReflUtil.getNMSClass("EntityThrownTrident");
|
||||
} catch (Throwable ignored) {
|
||||
// 1.17+
|
||||
}
|
||||
|
||||
try {
|
||||
if(entityThrownTridentClass == null) {
|
||||
// 1.17+
|
||||
entityThrownTridentClass = Class.forName("net.minecraft.world.entity.projectile.EntityThrownTrident");
|
||||
}
|
||||
getHandleMethod = ReflUtil.getOBCClass("entity.CraftTrident").getMethod("getHandle");
|
||||
for (Field field : entityThrownTridentClass.getDeclaredFields()) {
|
||||
if (field.getType() == Boolean.TYPE) {
|
||||
@ -32,6 +42,7 @@ public class WatchTrident extends BukkitRunnable {
|
||||
} catch (Exception e) {
|
||||
damageDealtField = null;
|
||||
getHandleMethod = null;
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (fieldCount == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user