Don't resave cells on stopping creation, fixes #74

We was saving everything again when the players stop creating anything,
this was causing issues with duplicate cells when using any storage with
SQL (due to insert and no primary key).

Also, added a hasChanged to the cell class which will prevent resaving
things in sql if it hasn't changed.
This commit is contained in:
graywolf336
2015-05-26 14:57:38 -05:00
parent fd52be6972
commit 12f35a01bf
7 changed files with 75 additions and 12 deletions

View File

@ -33,8 +33,6 @@ public class JailStopCommand implements Command {
if(nothing) {
sender.sendMessage(ChatColor.RED + "You've stopped creating....nothing.");
}else {
jm.getPlugin().getJailIO().saveEverything();
}
return true;