Double the trouble

This commit is contained in:
Nassim Jahnke 2023-03-17 21:47:55 +01:00
parent 573201c0b1
commit ad56caeb88
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
@ -199,6 +200,7 @@ public class BukkitViaLoader implements ViaPlatformLoader {
private boolean hasGetHandMethod() {
try {
PlayerInteractEvent.class.getDeclaredMethod("getHand");
Material.class.getMethod("getEquipmentSlot");
return true;
} catch (NoSuchMethodException e) {
return false;