Optimizing how we save PlayerProfiles a bit

This commit is contained in:
nossr50 2012-03-22 14:28:22 -07:00
parent ab50b32f60
commit 9bfbf85b4b
3 changed files with 3 additions and 4 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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());
}
}