-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a765c62
commit a8f7ee3
Showing
8 changed files
with
106 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package co.kepler.fastcraftplus.config; | ||
|
||
import co.kepler.fastcraftplus.FastCraft; | ||
import org.bukkit.configuration.Configuration; | ||
|
||
/** | ||
* A class for access to the FastCraft+ configuration. | ||
*/ | ||
public class Config { | ||
private Configuration config; | ||
|
||
public Config() { | ||
loadConfig(); | ||
} | ||
|
||
/** | ||
* Loads config with default values, and saves to update the config. | ||
*/ | ||
public void loadConfig() { | ||
FastCraft fastCraft = FastCraft.getInstance(); | ||
fastCraft.saveDefaultConfig(); | ||
config = fastCraft.getConfig(); | ||
config.options().copyDefaults(true); | ||
fastCraft.saveConfig(); | ||
} | ||
|
||
public String getLanguage() { | ||
return config.getString("language"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# language: EN Custom languages can be added by creating another file | ||
# in the lang directory of the FastCraft+ jar file. | ||
|
||
language: EN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters