File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
src/main/java/com/comphenix/protocol/wrappers Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -104,20 +104,21 @@ public class WrappedRegistry {
104
104
.returnTypeExact (MinecraftReflection .getMinecraftKeyClass ())
105
105
.build ()));
106
106
107
- MethodAccessor getHolder ;
108
-
109
- try {
110
- getHolder = Accessors .getMethodAccessor (fuzzy .getMethod (FuzzyMethodContract
111
- .newBuilder ()
112
- .parameterCount (1 )
113
- .banModifier (Modifier .STATIC )
114
- .returnTypeExact (MinecraftReflection .getHolderClass ())
115
- .requireModifier (Modifier .PUBLIC )
116
- .build ()));
117
- } catch (IllegalArgumentException ignored ) {
118
- getHolder = null ;
107
+ MethodAccessor getHolder = null ;
108
+
109
+ if (MinecraftVersion .FEATURE_PREVIEW_2 .atOrAbove ()) {
110
+ try {
111
+ getHolder = Accessors .getMethodAccessor (fuzzy .getMethod (FuzzyMethodContract
112
+ .newBuilder ()
113
+ .parameterCount (1 )
114
+ .banModifier (Modifier .STATIC )
115
+ .returnTypeExact (MinecraftReflection .getHolderClass ())
116
+ .requireModifier (Modifier .PUBLIC )
117
+ .build ()));
118
+ } catch (IllegalArgumentException ignored ) {
119
+ }
119
120
}
120
-
121
+
121
122
GET_HOLDER = getHolder ;
122
123
}
123
124
You can’t perform that action at this time.
0 commit comments