mirror of
https://github.com/YouHaveTrouble/YardWatch.git
synced 2026-05-11 22:16:58 +00:00
Resource apiversion.txt not found on startup (#5)
* fix resource apiversion.txt not found * add whitespace back
This commit is contained in:
@@ -27,8 +27,11 @@ public final class YardWatch extends JavaPlugin {
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
URL url = Resources.getResource("apiversion.txt");
|
final URL url = getClassLoader().getResource("apiversion.txt");
|
||||||
yardWatchApiVersion = Resources.toString(url, com.google.common.base.Charsets.UTF_8);
|
|
||||||
|
if (url != null) {
|
||||||
|
yardWatchApiVersion = Resources.toString(url, com.google.common.base.Charsets.UTF_8);
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
getLogger().warning("Failed to read YardWatch API version.");
|
getLogger().warning("Failed to read YardWatch API version.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user