mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-11-24 02:08:48 +00:00
全版本兼容”
This commit is contained in:
parent
4f8b43bdb9
commit
e26d5490be
@ -54,10 +54,8 @@ public class C {
|
||||
static {
|
||||
version=getNMSVersion();
|
||||
titlePAB=false;
|
||||
try {
|
||||
try {
|
||||
cauldron1710 = version.equals("v1_7_R4") && Package.getPackage("net.minecraftforge.cauldron") != null;
|
||||
}catch (Exception e){}
|
||||
if(cauldron1710) {
|
||||
try{
|
||||
Class.forName("cc.uraniummc.Uranium");
|
||||
@ -79,7 +77,7 @@ public class C {
|
||||
packetType = Class.forName(a("PacketPlayOutChat"));
|
||||
}
|
||||
Arrays.stream(packetType.getConstructors()).forEach(c -> {
|
||||
if (c.getParameterTypes().length == 2) {
|
||||
if (c.getParameterTypes().length == 2&&!c.getParameterTypes()[1].getName().equals("boolean")) {
|
||||
packetTypeConstructor = c;
|
||||
}
|
||||
});
|
||||
@ -97,7 +95,11 @@ public class C {
|
||||
nmsChatMessageTypeClassValueOf = nmsChatMessageTypeClass.getDeclaredMethod("valueOf", String.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
packetTypeConstructor = packetType.getConstructor(String.class);
|
||||
}catch (Exception e2){
|
||||
packetTypeConstructor = packetType.getConstructor(nmsIChatBaseComponent);
|
||||
}
|
||||
}
|
||||
Class<?> typeCraftPlayer = Class.forName(b("entity.CraftPlayer"));
|
||||
getHandle = typeCraftPlayer.getMethod("getHandle");
|
||||
|
Loading…
Reference in New Issue
Block a user