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

View File

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