File tree 1 file changed +6
-3
lines changed
triton-spigot/loader/src/main/java/com/rexcantor64/triton/loader
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ private boolean shouldRelocateAdventure() {
31
31
// TODO manual override
32
32
33
33
try {
34
- // Class only available on adventure 4.15.0+
35
- Class .forName ("net.kyori.adventure.resource.ResourcePackCallback" );
34
+ // Method only available on adventure 4.18.0+
35
+ // Required for minimessage to work
36
+ // We have to check the method because other plugins might add the ShadowColor class even though it's not used
37
+ Class <?> styleClass = Class .forName ("net.kyori.adventure.text.format.StyleGetter" );
38
+ styleClass .getDeclaredMethod ("shadowColor" );
36
39
37
40
// A modern version of adventure is already present
38
41
return false ;
39
- } catch (ClassNotFoundException ignore ) {
42
+ } catch (ClassNotFoundException | NoSuchMethodException ignore ) {
40
43
// Adventure is not present or an outdated version is present
41
44
return true ;
42
45
}
You can’t perform that action at this time.
0 commit comments