Added a option for saving gates after every change.
This commit is contained in:
parent
36be95d0f5
commit
aeae14e2a0
@ -1,5 +1,6 @@
|
||||
maxGateBlocks: 50
|
||||
playerGateBlockUpdateRadius: 64
|
||||
saveOnChanges: true
|
||||
checkForBrokenGateFrames: true
|
||||
gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
|
||||
showTeleportMessage: true
|
||||
|
@ -53,7 +53,7 @@ public class Gate implements ConfigurationSerializable
|
||||
{
|
||||
return super.toString() + " " + this.getId();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user