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:
parent
ef3eac05bc
commit
87587d3852
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user