1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

Defaulting to save on disconnect with multiserver support

This commit is contained in:
Zrips 2022-03-11 17:11:49 +02:00
parent ef3eac05bc
commit 87587d3852
3 changed files with 2 additions and 3 deletions

View File

@ -278,7 +278,7 @@ public class PlayerManager {
return;
jPlayer.onDisconnect();
if (Jobs.getGCManager().saveOnDisconnect()) {
if (Jobs.getGCManager().saveOnDisconnect() || Jobs.getGCManager().MultiServerCompatability()) {
jPlayer.setSaved(false);
jPlayer.save();
}

View File

@ -890,7 +890,6 @@ public class JobsPlayer {
* Perform disconnect for this player
*/
public void onDisconnect() {
// Jobs.getJobsDAO().savePoints(this);
clearBossMaps();
isOnline = false;
Jobs.getPlayerManager().addPlayerToCache(this);

View File

@ -166,7 +166,7 @@ public class JobsListener implements Listener {
if (!Jobs.getGCManager().MultiServerCompatability())
Jobs.getPlayerManager().playerJoin(event.getPlayer());
else {
plugin.getServer().getScheduler().runTaskLater(plugin, () -> Jobs.getPlayerManager().playerJoin(event.getPlayer()), 10L);
plugin.getServer().getScheduler().runTaskLater(plugin, () -> Jobs.getPlayerManager().playerJoin(event.getPlayer()), 40L);
}
}