Added a option for saving gates after every change.
This commit is contained in:
parent
36be95d0f5
commit
aeae14e2a0
@ -1,5 +1,6 @@
|
|||||||
maxGateBlocks: 50
|
maxGateBlocks: 50
|
||||||
playerGateBlockUpdateRadius: 64
|
playerGateBlockUpdateRadius: 64
|
||||||
|
saveOnChanges: true
|
||||||
checkForBrokenGateFrames: true
|
checkForBrokenGateFrames: true
|
||||||
gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
|
gateTeleportMessage: "Thank you for traveling with Craft Inc. Gates."
|
||||||
showTeleportMessage: true
|
showTeleportMessage: true
|
||||||
|
@ -53,7 +53,7 @@ public class Gate implements ConfigurationSerializable
|
|||||||
{
|
{
|
||||||
return super.toString() + " " + this.getId();
|
return super.toString() + " " + this.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -48,6 +48,7 @@ public class Plugin extends JavaPlugin
|
|||||||
public static final String confShowTeleportMessageKey = "showTeleportMessage";
|
public static final String confShowTeleportMessageKey = "showTeleportMessage";
|
||||||
public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage";
|
public static final String confGateTeleportNoPermissionMessageKey = "gateTeleportNoPermissionMessage";
|
||||||
public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage";
|
public static final String confShowTeleportNoPermissionMessageKey = "showTeleportNoPermissionMessage";
|
||||||
|
public static final String confSaveOnChangesKey = "saveOnChanges";
|
||||||
|
|
||||||
private static Plugin instance;
|
private static Plugin instance;
|
||||||
private static Permission permission;
|
private static Permission permission;
|
||||||
@ -151,7 +152,6 @@ public class Plugin extends JavaPlugin
|
|||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
log("Enabled");
|
log("Enabled");
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PluginManager pm = this.getServer().getPluginManager();
|
PluginManager pm = this.getServer().getPluginManager();
|
||||||
|
@ -69,7 +69,7 @@ public abstract class BaseCommand
|
|||||||
|
|
||||||
this.perform();
|
this.perform();
|
||||||
|
|
||||||
if (this.shouldPersistToDisk) {
|
if (this.shouldPersistToDisk && Plugin.getPlugin().getConfig().getBoolean(Plugin.confSaveOnChangesKey)) {
|
||||||
Plugin.getPlugin().getGatesManager().saveGatesToDisk();
|
Plugin.getPlugin().getGatesManager().saveGatesToDisk();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user