@@ -49,20 +49,15 @@ public final class VersionUtil {
49
49
public static final boolean PRE_FLATTENING = VersionUtil .getServerBukkitVersion ().isLowerThan (VersionUtil .v1_13_0_R01 );
50
50
51
51
private static final Map <String , SupportStatus > unsupportedServerClasses ;
52
+ private static final String PFX = make ("8(;4>`" );
52
53
53
54
static {
54
55
final ImmutableMap .Builder <String , SupportStatus > builder = new ImmutableMap .Builder <>();
55
56
56
- // Yatopia - Extremely volatile patch set;
57
- // * Messes with proxy-forwarded UUIDs
58
- // * Frequent data corruptions
59
- builder .put ("org.yatopiamc.yatopia.server.YatopiaConfig" , SupportStatus .DANGEROUS_FORK );
60
- builder .put ("net.yatopia.api.event.PlayerAttackEntityEvent" , SupportStatus .DANGEROUS_FORK );
61
- builder .put ("org.bukkit.plugin.SimplePluginManager#getPluginLoaders" , SupportStatus .DANGEROUS_FORK );
62
- builder .put ("org.bukkit.Bukkit#getLastTickTime" , SupportStatus .DANGEROUS_FORK );
63
- builder .put ("brand:Yatopia" , SupportStatus .DANGEROUS_FORK );
64
- // Yatopia downstream(s) which attempt to do tricky things :)
65
- builder .put ("brand:Hyalus" , SupportStatus .DANGEROUS_FORK );
57
+ // Leaf, yet another "High Performance" fork of Paper. Not supported by EssentialsX.
58
+ builder .put (make ("5(=t>(??;7t6?;<t\\ 026?;<\\ 03055.).(;*" ), SupportStatus .DANGEROUS_FORK );
59
+ builder .put ("brand:Leaf" , SupportStatus .DANGEROUS_FORK );
60
+ builder .put (PFX + make ("\\ 026?;<" ), SupportStatus .DANGEROUS_FORK );
66
61
67
62
// KibblePatcher - Dangerous bytecode editor snakeoil whose only use is to break plugins
68
63
builder .put ("net.kibblelands.server.FastMath" , SupportStatus .DANGEROUS_FORK );
@@ -71,18 +66,17 @@ public final class VersionUtil {
71
66
builder .put ("ml.tcoded.nochatreports.NoChatReportsSpigot" , SupportStatus .STUPID_PLUGIN );
72
67
builder .put ("me.doclic.noencryption.NoEncryption" , SupportStatus .STUPID_PLUGIN );
73
68
74
- // Akarin - Dangerous patch history;
75
- // * Potentially unsafe saving of nms.JsonList
76
- builder .put ("io.akarin.server.Config" , SupportStatus .DANGEROUS_FORK );
77
-
78
69
// Forge - Doesn't support Bukkit
79
- // The below translates to net.minecraftforge.common.MinecraftForge
80
- builder .put (dumb (new int [] {110 , 101 , 116 , 46 , 109 , 105 , 110 , 101 , 99 , 114 , 97 , 102 , 116 , 102 , 111 , 114 , 103 , 101 , 46 , 99 , 111 , 109 , 109 , 111 , 110 , 46 , 77 , 105 , 110 , 101 , 99 , 114 , 97 , 102 , 116 , 70 , 111 , 114 , 103 , 101 }, 40 ), SupportStatus .UNSTABLE );
70
+ builder .put ("net.minecraftforge.common.MinecraftForge" , SupportStatus .UNSTABLE );
71
+ builder .put (make ("4?.t734?9(;<.<5(=?t957754t\\ 02734?9(;<.\\ 0345(=?" ), SupportStatus .UNSTABLE );
72
+ builder .put (PFX + make ("\\ 027523)." ), SupportStatus .UNSTABLE );
81
73
builder .put ("brand:Mohist" , SupportStatus .UNSTABLE );
82
74
83
75
// Fabric - Doesn't support Bukkit
84
76
// The below translates to net.fabricmc.loader.launch.knot.KnotServer
85
- builder .put (dumb (new int [] {110 , 101 , 116 , 46 , 102 , 97 , 98 , 114 , 105 , 99 , 109 , 99 , 46 , 108 , 111 , 97 , 100 , 101 , 114 , 46 , 108 , 97 , 117 , 110 , 99 , 104 , 46 , 107 , 110 , 111 , 116 , 46 , 75 , 110 , 111 , 116 , 83 , 101 , 114 , 118 , 101 , 114 }, 42 ), SupportStatus .UNSTABLE );
77
+ builder .put ("net.fabricmc.loader.launch.knot.KnotServer" , SupportStatus .UNSTABLE );
78
+ builder .put (make ("4?.t<;8(3979t65;>?(t6;/492t145.t\\ 02145.\\ t?(,?(" ), SupportStatus .UNSTABLE );
79
+ builder .put (PFX + make ("\\ 0035/?(" ), SupportStatus .UNSTABLE );
86
80
87
81
// Misc translation layers that do not add NMS will be caught by this
88
82
if (ReflUtil .getNmsVersionObject ().isHigherThanOrEqualTo (ReflUtil .V1_17_R1 )) {
@@ -117,8 +111,8 @@ public static SupportStatus getServerSupportStatus() {
117
111
if (supportStatus == null ) {
118
112
for (Map .Entry <String , SupportStatus > entry : unsupportedServerClasses .entrySet ()) {
119
113
120
- if (entry .getKey ().startsWith ("brand:" )) {
121
- if (Bukkit .getName ().equalsIgnoreCase (entry .getKey ().replaceFirst ("brand:" , "" ))) {
114
+ if (entry .getKey ().startsWith (PFX )) {
115
+ if (Bukkit .getName ().equalsIgnoreCase (entry .getKey ().replaceFirst (PFX , "" ))) {
122
116
supportStatusClass = entry .getKey ();
123
117
return supportStatus = entry .getValue ();
124
118
}
@@ -354,20 +348,11 @@ public boolean isSupported() {
354
348
}
355
349
}
356
350
357
- private static String dumb (final int [] clazz , final int len ) {
358
- final char [] chars = new char [clazz .length ];
359
-
360
- for (int i = 0 ; i < clazz .length ; i ++) {
361
- chars [i ] = (char ) clazz [i ];
362
- }
363
-
364
- final String decode = String .valueOf (chars );
365
-
366
- if (decode .charAt (0 ) != 'n' || decode .length () != len ) {
367
- System .exit (1 );
368
- return "why do hybrids try to bypass this?" ;
351
+ private static String make (String in ) {
352
+ final char [] c = in .toCharArray ();
353
+ for (int i = 0 ; i < c .length ; i ++) {
354
+ c [i ] ^= 0x5A ;
369
355
}
370
-
371
- return decode ;
356
+ return new String (c );
372
357
}
373
358
}
0 commit comments