Caused by: java.lang.IllegalArgumentException: No enum constant io.illyria.skyblockx.shade.baseplugin.XMaterial.Optional[Air] this string is the way to understand the problem. SBFReader can not read the string Optional[Air], it need to actualy be AIR. So to slove this I create another class that use SBFReader and SBFWriter to translate all wrong syntax to right, and it actually help.
@ProSavage, You need to add some checks in SkyblockX/src/main/kotlin/io/illyria/skyblockx/sedit/SkyblockEdit.kt before line 77. Because
XMaterial.matchXMaterial(block.type.name).toString() - command is returning Optional[Air], so I just use this regex to check (Optional|optional)\[(\w+\s\w+|\w+)], and after that make some string transform:
Caused by: java.lang.IllegalArgumentException: No enum constant io.illyria.skyblockx.shade.baseplugin.XMaterial.Optional[Air]
this string is the way to understand the problem. SBFReader can not read the stringOptional[Air]
, it need to actualy beAIR
. So to slove this I create another class that use SBFReader and SBFWriter to translate all wrong syntax to right, and it actually help. @ProSavage, You need to add some checks inSkyblockX/src/main/kotlin/io/illyria/skyblockx/sedit/SkyblockEdit.kt
before line 77. BecauseXMaterial.matchXMaterial(block.type.name).toString()
- command is returningOptional[Air]
, so I just use this regex to check(Optional|optional)\[(\w+\s\w+|\w+)]
, and after that make some string transform:19 #18