Skip to content

Commit 71657e7

Browse files
committed
Add support to ViaVersion 4.0.0
1 parent bb9ede8 commit 71657e7

File tree

14 files changed

+21
-16
lines changed

14 files changed

+21
-16
lines changed

NmsReference/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

TreysDoubleJump/dependency-reduced-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>TreysDoubleJumpMain</artifactId>
55
<groupId>me.treyruffy.treysdoublejump</groupId>
6-
<version>2.6.5</version>
6+
<version>2.6.6</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>TreysDoubleJump</artifactId>

TreysDoubleJump/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
@@ -81,7 +81,7 @@
8181
<dependency>
8282
<groupId>net.kyori</groupId>
8383
<artifactId>adventure-api</artifactId>
84-
<version>4.7.0</version>
84+
<version>4.8.0</version>
8585
</dependency>
8686
<dependency>
8787
<groupId>net.kyori</groupId>

TreysDoubleJump/src/main/java/me/treyruffy/treysdoublejump/events/DoubleJump.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void onMove(PlayerMoveEvent e) {
9393
if (!ConfigManager.getConfig().getStringList("DisabledBlocks").isEmpty()) {
9494
for (String blocks : ConfigManager.getConfig().getStringList("DisabledBlocks")) {
9595
try {
96-
if (p.getWorld().getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.valueOf(blocks.toUpperCase())) {
96+
if (p.getWorld().getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.valueOf(blocks.toUpperCase()) || p.getWorld().getBlockAt(p.getLocation()).getType() == Material.valueOf(blocks.toUpperCase())) {
9797
Grounded.remove(p.getUniqueId().toString());
9898
return;
9999
}
@@ -112,7 +112,7 @@ public void onMove(PlayerMoveEvent e) {
112112
return;
113113
}
114114
if (!ConfigManager.getConfig().getBoolean("InfiniteJump.Enabled") || !p.hasPermission("tdj.infinitejump")) {
115-
if (!p.isOnGround() || p.getWorld().getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.AIR) {
115+
if (!p.isOnGround() || (p.getWorld().getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.AIR && p.getWorld().getBlockAt(p.getLocation()).getType() == Material.AIR)) {
116116
return;
117117
}
118118

@@ -165,6 +165,7 @@ public void onMove(PlayerMoveEvent e) {
165165
if (!ConfigManager.getConfig().getBoolean("NoFall.Enabled"))
166166
p.setEnableFallDamageWhileAllowFlight(true);
167167
} catch (NoSuchMethodError ignored) {}
168+
Grounded.remove(p.getUniqueId().toString());
168169
}, 1L);
169170
} else {
170171
if (Bukkit.getPluginManager().getPlugin("NoCheatPlus") != null) {
@@ -181,6 +182,7 @@ public void onMove(PlayerMoveEvent e) {
181182
if (!ConfigManager.getConfig().getBoolean("NoFall.Enabled"))
182183
p.setEnableFallDamageWhileAllowFlight(true);
183184
} catch (NoSuchMethodError ignored) {}
185+
Grounded.remove(p.getUniqueId().toString());
184186
return;
185187
}
186188
NCPExemptionManager.exemptPermanently(p, CheckType.MOVING_SURVIVALFLY);
@@ -195,6 +197,7 @@ public void onMove(PlayerMoveEvent e) {
195197
if (!ConfigManager.getConfig().getBoolean("NoFall.Enabled"))
196198
p.setEnableFallDamageWhileAllowFlight(true);
197199
} catch (NoSuchMethodError ignored) {}
200+
Grounded.remove(p.getUniqueId().toString());
198201
NCP(p);
199202
}
200203
return;
@@ -210,6 +213,7 @@ public void onMove(PlayerMoveEvent e) {
210213
if (!ConfigManager.getConfig().getBoolean("NoFall.Enabled"))
211214
p.setEnableFallDamageWhileAllowFlight(true);
212215
} catch (NoSuchMethodError ignored) {}
216+
Grounded.remove(p.getUniqueId().toString());
213217
}
214218

215219

@@ -361,6 +365,7 @@ public void run() {
361365
case "v1_16_R1":
362366
case "v1_16_R2":
363367
case "v1_16_R3":
368+
case "v1_17_R1":
364369
particles = new Particle_1_16_R3();
365370
break;
366371
default:

TreysDoubleJump/src/main/java/me/treyruffy/treysdoublejump/events/NoFallDamage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class NoFallDamage implements Listener {
1616

1717
// Cancels damage if no fall is enabled
18-
@EventHandler(priority = EventPriority.HIGHEST)
18+
@EventHandler(priority = EventPriority.HIGH)
1919
public void noFall(EntityDamageEvent e) {
2020
if ((!e.getCause().equals(DamageCause.FALL))) {
2121
return;

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>me.treyruffy.treysdoublejump</groupId>
99
<artifactId>TreysDoubleJumpMain</artifactId>
10-
<version>2.6.5</version>
10+
<version>2.6.6</version>
1111
<modules>
1212
<module>TreysDoubleJump</module>
1313
<module>v1_8_R1</module>

v1_10_R1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

v1_11_R1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

v1_12_R1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

v1_8_R1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>TreysDoubleJumpMain</artifactId>
77
<groupId>me.treyruffy.treysdoublejump</groupId>
8-
<version>2.6.5</version>
8+
<version>2.6.6</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

0 commit comments

Comments
 (0)