mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +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;
|
return;
|
||||||
|
|
||||||
jPlayer.onDisconnect();
|
jPlayer.onDisconnect();
|
||||||
if (Jobs.getGCManager().saveOnDisconnect()) {
|
if (Jobs.getGCManager().saveOnDisconnect() || Jobs.getGCManager().MultiServerCompatability()) {
|
||||||
jPlayer.setSaved(false);
|
jPlayer.setSaved(false);
|
||||||
jPlayer.save();
|
jPlayer.save();
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,6 @@ public class JobsPlayer {
|
|||||||
* Perform disconnect for this player
|
* Perform disconnect for this player
|
||||||
*/
|
*/
|
||||||
public void onDisconnect() {
|
public void onDisconnect() {
|
||||||
// Jobs.getJobsDAO().savePoints(this);
|
|
||||||
clearBossMaps();
|
clearBossMaps();
|
||||||
isOnline = false;
|
isOnline = false;
|
||||||
Jobs.getPlayerManager().addPlayerToCache(this);
|
Jobs.getPlayerManager().addPlayerToCache(this);
|
||||||
|
@ -166,7 +166,7 @@ public class JobsListener implements Listener {
|
|||||||
if (!Jobs.getGCManager().MultiServerCompatability())
|
if (!Jobs.getGCManager().MultiServerCompatability())
|
||||||
Jobs.getPlayerManager().playerJoin(event.getPlayer());
|
Jobs.getPlayerManager().playerJoin(event.getPlayer());
|
||||||
else {
|
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