mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Optimizing how we save PlayerProfiles a bit
This commit is contained in:
parent
ab50b32f60
commit
9bfbf85b4b
@ -31,6 +31,7 @@ Version 1.3.03-dev
|
||||
= Fixed exploit where falling sand & gravel weren't tracked
|
||||
= Fixed exploit where Acrobatics could be leveled via Dodge on party members.
|
||||
= Fixed exploit where you could gain combat XP on animals summoned by Call of the Wild
|
||||
! Changed mcMMO to save profiles only when the profile is about to be discarded rather than on player quit
|
||||
! Changed MySQL to try to reconnect every 60 seconds rather than infinitely which caused server hangs
|
||||
! Changed mcMMO to be better about saving player information on server shutdown
|
||||
! Changed PTP to prevent teleporting if you've been hurt in the last 30 seconds (configurable)
|
||||
|
@ -149,9 +149,6 @@ public class mcPlayerListener implements Listener {
|
||||
Combat.dealDamage(player, PP.getBleedTicks()*2);
|
||||
}
|
||||
|
||||
//Save PlayerData to MySQL/FlatFile on player quit
|
||||
PP.save();
|
||||
|
||||
//Schedule PlayerProfile removal 2 minutes after quitting
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new RemoveProfileFromMemoryTask(player), 2400);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ public class RemoveProfileFromMemoryTask implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Users.removeUser(player);
|
||||
Users.getProfile(player.getName()).save(); //We save here so players don't quit/reconnect to cause lag
|
||||
Users.removeUserByName(player.getName());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user