Pyrbu / ZNPCsPlus

A Spigot plugin for creating interactable fake entities
https://www.spigotmc.org/resources/znpcsplus.109380/
GNU General Public License v3.0
118 stars 29 forks source link

[Thread Safety] Shouldn't call Bukkit API asynchronously #137

Open Summiner opened 8 months ago

Summiner commented 8 months ago

Throughout this project there are multiple cases of calling Placeholderapi#setPlaceholders asynchronously which is technically unsafe behavior. This was brought to my attention by a friend when doing the same thing myself. This doesn't cause any issues in the surface however it should ideally be resolved to prevent any potential thread safety issues.

An example of doing this property can be found here: https://github.com/NEZNAMY/TAB/blob/9a6d309840414081b867838ea1d59b38a005e79d/bukkit/src/main/java/me/neznamy/tab/platforms/bukkit/platform/BukkitPlatform.java#L219