Skip to content

Commit

Permalink
Fix getDataFolder and implment getResourceAsStream()
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jun 19, 2020
1 parent 0b2c928 commit 0f333ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ public EventManager getEventManager() {
* Return our dataFolder based upon the plugin name
*/
public File getDataFolder() {
return new File(getConnector().getBootstrap().getDataFolder(), getName());
return getConnector().getBootstrap().getDataFolder().toPath().resolve("plugins").resolve(getName()).toFile();
}

/**
* Return an InputStream for a resource file
*/
public InputStream getResourceAsStream(String name) {
return getClass().getResourceAsStream(name);
return getClass().getClassLoader().getResourceAsStream(name);
}
}

0 comments on commit 0f333ee

Please sign in to comment.