kangarko / Foundation

Foundation™ helps you create highly customized Minecraft plugins (based on Spigot/Paper API) that support multiple MC versions.
https://mineacademy.org
305 stars 63 forks source link

Added primary thread check to CompProperty#applyLegacy #265

Closed BertGarretsen closed 7 months ago

BertGarretsen commented 7 months ago

I was using PlayerUtil#normalize, which stopped all code execution after invoking it. this was due to an NbtApiException being thrown silently. the NbtApiException was thrown because NBT-API was being accessed off the main thread in CompPropery#applyLegacy, i added a check in there so future users are not head scratching for an hour. perhaps it should be handled differently though.

at least now it will let you know what the problem is.

kangarko commented 7 months ago

Thank you very much, great catch! I apology for the oversight.