mirror of
https://github.com/darksaid98/nightcore-spigot.git
synced 2026-12-04 14:38:46 +00:00
v2.6.3, update 2
This commit is contained in:
1 parent
5c4477847d
commit
2d334e3f2c
1 file changed
+9
-1
@@ -36,7 +36,7 @@ public abstract class AbstractUserManager<P extends NightDataPlugin<U>, U extend
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onShutdown() {
|
protected void onShutdown() {
|
||||||
this.getLoaded().forEach(this::save);
|
this.saveAll();
|
||||||
this.getLoadedByIdMap().clear();
|
this.getLoadedByIdMap().clear();
|
||||||
this.getLoadedByNameMap().clear();
|
this.getLoadedByNameMap().clear();
|
||||||
this.scheduledSaves.clear();
|
this.scheduledSaves.clear();
|
||||||
@@ -64,6 +64,14 @@ public abstract class AbstractUserManager<P extends NightDataPlugin<U>, U extend
|
|||||||
this.scheduledSaves.clear();
|
this.scheduledSaves.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveAll() {
|
||||||
|
Set<U> users = new HashSet<>();
|
||||||
|
users.addAll(this.scheduledSaves);
|
||||||
|
users.addAll(this.getLoaded());
|
||||||
|
this.getDataHandler().saveUsers(users);
|
||||||
|
this.scheduledSaves.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public final U getUserData(@NotNull Player player) {
|
public final U getUserData(@NotNull Player player) {
|
||||||
UUID uuid = player.getUniqueId();
|
UUID uuid = player.getUniqueId();
|
||||||
|
|||||||
Reference in new issue
Block a user