Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-24 15:20:15 +01:00
Minor change
Fixes #1431 (also trying the awesome GitHub auto-closing)
Dieser Commit ist enthalten in:
Ursprung
5b403da966
Commit
91c2987cfe
@ -39,13 +39,13 @@ public class PlayerSneakListener extends ViaBukkitListener {
|
||||
final String packageName = plugin.getServer().getClass().getPackage().getName();
|
||||
getHandle = Class.forName(packageName + ".entity.CraftPlayer").getMethod("getHandle");
|
||||
|
||||
final Class<?> entityPlayerClass = Class.forName(packageName
|
||||
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer");
|
||||
try {
|
||||
setSize = Class.forName(packageName
|
||||
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer").getMethod("setSize", Float.TYPE, Float.TYPE);
|
||||
} catch (ClassNotFoundException | NoSuchMethodException e) {
|
||||
setSize = entityPlayerClass.getMethod("setSize", Float.TYPE, Float.TYPE);
|
||||
} catch (NoSuchMethodException e) {
|
||||
// Don't catch this one
|
||||
setSize = Class.forName(packageName
|
||||
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer").getMethod("a", Float.TYPE, Float.TYPE);
|
||||
setSize = entityPlayerClass.getMethod("a", Float.TYPE, Float.TYPE);
|
||||
}
|
||||
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren