File tree Expand file tree Collapse file tree
stickynote-bukkit/stickynote-bukkit-nms/src/main/kotlin/org/sayandev/stickynote/bukkit/nms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ import java.util.function.UnaryOperator
3232
3333object NMSUtils {
3434
35- private val PAPER_SERVER_ENTITY_CONSTRUCTOR : Constructor <* >? = ServerEntityAccessor .TYPE ?.getDeclaredConstructor(
35+ private val PAPER_SERVER_ENTITY_CONSTRUCTOR : Constructor <* >? = runCatching { ServerEntityAccessor .TYPE ?.getDeclaredConstructor(
3636 ServerLevelAccessor .TYPE ,
3737 EntityAccessor .TYPE ,
3838 Int ::class .java,
3939 Boolean ::class .java,
4040 Consumer ::class .java,
4141 Set ::class .java
42- )
42+ ) }.getOrNull()
4343 private val CRAFT_ITEM_STACK : Result <Class <* >> = runCatching { XReflection .getCraftClass(" inventory.CraftItemStack" ) }
4444 private val CRAFT_PLAYER : Result <Class <* >> = runCatching { XReflection .getCraftClass(" entity.CraftPlayer" ) }
4545 private val CRAFT_WORLD : Result <Class <* >> = runCatching { XReflection .getCraftClass(" CraftWorld" ) }
You can’t perform that action at this time.
0 commit comments