Added a option for saving gates after every change.

This commit is contained in:
Tobias Ottenweller 2013-06-24 09:50:49 +02:00
parent 36be95d0f5
commit aeae14e2a0
4 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
maxGateBlocks: 50
playerGateBlockUpdateRadius: 64
saveOnChanges: true
checkForBrokenGateFrames: true
gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
showTeleportMessage: true

View File

@ -53,7 +53,7 @@ public class Gate implements ConfigurationSerializable
{
return super.toString() + " " + this.getId();
}
/**
*

View File

@ -48,6 +48,7 @@ public class Plugin extends JavaPlugin
public static final String confShowTeleportMessageKey = "showTeleportMessage";
public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage";
public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage";
public static final String confSaveOnChangesKey = "saveOnChanges";
private static Plugin instance;
private static Permission permission;
@ -151,7 +152,6 @@ public class Plugin extends JavaPlugin
if (success) {
log("Enabled");
}
else {
PluginManager pm = this.getServer().getPluginManager();

View File

@ -69,7 +69,7 @@ public abstract class BaseCommand
this.perform();
if (this.shouldPersistToDisk) {
if (this.shouldPersistToDisk && Plugin.getPlugin().getConfig().getBoolean(Plugin.confSaveOnChangesKey)) {
Plugin.getPlugin().getGatesManager().saveGatesToDisk();
}
}