diff --git a/Changelog.txt b/Changelog.txt index b371fce2f..7cd3edfc7 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 79240af81..b84104f31 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -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); } diff --git a/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java b/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java index 71a013543..81d6ad3e0 100644 --- a/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java @@ -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()); } }