Set UUID version if players are online when manager loads (Fixes #265)

This commit is contained in:
Phoenix616 2019-08-20 13:15:41 +01:00
parent 930b2cc07b
commit 5eb467a1d3

View File

@ -363,6 +363,9 @@ public class NameManager implements Listener {
}
public static void load() {
if (getUuidVersion() < 0 && !Bukkit.getOnlinePlayers().isEmpty()) {
setUuidVersion(Bukkit.getOnlinePlayers().iterator().next().getUniqueId().version());
}
try {
accounts = DaoCreator.getDaoAndCreateTable(Account.class);