mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-29 05:26:23 +01:00
Double the trouble
This commit is contained in:
parent
573201c0b1
commit
ad56caeb88
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user