-
Notifications
You must be signed in to change notification settings - Fork 0
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
aa27355
commit a1ead6b
Showing
3 changed files
with
52 additions
and
1 deletion.
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
33 changes: 33 additions & 0 deletions
33
src/main/java/me/opkarol/opc/api/plugin/OpMessagesPlugin.java
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,33 @@ | ||
package me.opkarol.opc.api.plugin; | ||
|
||
import me.opkarol.opc.api.files.ConfigurationMap; | ||
import me.opkarol.opc.api.files.TranslationObject; | ||
|
||
public abstract class OpMessagesPlugin<O, C> extends OpDatabasePlugin<O, C> { | ||
private static final ConfigurationMap configurationMap; | ||
|
||
static { | ||
configurationMap = new ConfigurationMap(getInstance(), "messages"); | ||
configurationMap.getConfiguration().updateConfig(); | ||
} | ||
|
||
public static ConfigurationMap getMap() { | ||
return configurationMap; | ||
} | ||
|
||
public static String getValue(String path) { | ||
return getMap().getValue(path); | ||
} | ||
|
||
public static String getFormattedValue(String path) { | ||
return getMap().getFormattedValue(path); | ||
} | ||
|
||
public static String getValue(String path, TranslationObject... objects) { | ||
return getMap().getValue(path, objects); | ||
} | ||
|
||
public static String getValue(String path, String[][] objects) { | ||
return getMap().getValue(path, objects); | ||
} | ||
} |
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