Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-24 23:30: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();
|
final String packageName = plugin.getServer().getClass().getPackage().getName();
|
||||||
getHandle = Class.forName(packageName + ".entity.CraftPlayer").getMethod("getHandle");
|
getHandle = Class.forName(packageName + ".entity.CraftPlayer").getMethod("getHandle");
|
||||||
|
|
||||||
|
final Class<?> entityPlayerClass = Class.forName(packageName
|
||||||
|
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer");
|
||||||
try {
|
try {
|
||||||
setSize = Class.forName(packageName
|
setSize = entityPlayerClass.getMethod("setSize", Float.TYPE, Float.TYPE);
|
||||||
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer").getMethod("setSize", Float.TYPE, Float.TYPE);
|
} catch (NoSuchMethodException e) {
|
||||||
} catch (ClassNotFoundException | NoSuchMethodException e) {
|
|
||||||
// Don't catch this one
|
// Don't catch this one
|
||||||
setSize = Class.forName(packageName
|
setSize = entityPlayerClass.getMethod("a", Float.TYPE, Float.TYPE);
|
||||||
.replace("org.bukkit.craftbukkit", "net.minecraft.server") + ".EntityPlayer").getMethod("a", Float.TYPE, Float.TYPE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren