mirror of
https://github.com/YouHaveTrouble/YardWatch.git
synced 2026-05-12 14:36: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() {
|
||||
|
||||
try {
|
||||
URL url = Resources.getResource("apiversion.txt");
|
||||
yardWatchApiVersion = Resources.toString(url, com.google.common.base.Charsets.UTF_8);
|
||||
final URL url = getClassLoader().getResource("apiversion.txt");
|
||||
|
||||
if (url != null) {
|
||||
yardWatchApiVersion = Resources.toString(url, com.google.common.base.Charsets.UTF_8);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
getLogger().warning("Failed to read YardWatch API version.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user