MinusKube / SmartInvs

Advanced Inventory API for your Minecraft Bukkit plugins.
https://minuskube.gitbook.io/smartinvs/
Apache License 2.0
262 stars 65 forks source link

Do not store player objects directly because of reference integrity #174

Closed ghost closed 3 years ago

ghost commented 3 years ago

The Bukkit / Spigot API makes NO guarantees regarding the integrity of references to Entities (such as Player). Thus, it is advised to only ever store the UUIDs of players and convert them into real players using Bukkit.getPlayer. There are virtually no performance penalties involved because Bukkit.getPlayer internally uses a HashMap to store map UUIDs to Player objects.

MinusKube commented 3 years ago

Thanks :)