Add some settings management and also parse the time format.
This allows for: 30seconds, 10minutes, 3hours, or 2days
This commit is contained in:
21
src/main/java/com/graywolf336/jail/enums/Settings.java
Normal file
21
src/main/java/com/graywolf336/jail/enums/Settings.java
Normal file
@ -0,0 +1,21 @@
|
||||
package com.graywolf336.jail.enums;
|
||||
|
||||
public enum Settings {
|
||||
DEBUG("system.debug"),
|
||||
UPDATENOTIFICATIONS("system.updateNotifications"),
|
||||
JAILDEFAULTTIME("jailing.jail.defaultTime");
|
||||
|
||||
private String path;
|
||||
|
||||
private Settings(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the path this setting is in config.
|
||||
* @return The path where this setting resides in the config.
|
||||
*/
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user