Skip to content

Commit

Permalink
Provide getResourceAsStream for GeyserPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jun 19, 2020
1 parent ed0706a commit 0b2c928
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.geysermc.connector.plugin.annotations.Plugin;

import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -164,4 +165,11 @@ public EventManager getEventManager() {
public File getDataFolder() {
return new File(getConnector().getBootstrap().getDataFolder(), getName());
}

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

0 comments on commit 0b2c928

Please sign in to comment.