Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
[U] v2.0.5-SNAPSHOT 修复getClass无法获取Resources问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Jun 19, 2018
1 parent b7dc3f6 commit 42927ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Bukkit的用法教程: https://www.spigotmc.org/wiki/creating-a-config-file/ <br
<dependency>
<groupId>com.github.hykilpikonna</groupId>
<artifactId>HyConfigLib</artifactId>
<version>2.0.4-SNAPSHOT</version>
<version>2.0.5-SNAPSHOT</version>
</dependency>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cc.moecraft.yaml</groupId>
<artifactId>HyConfigLib</artifactId>
<version>2.0.4-SNAPSHOT</version>
<version>2.0.5-SNAPSHOT</version>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cc/moecraft/yaml/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Config(String dir, String fileName, String fileExtension)
* @param resourceClass 带resources的类
* @throws IOException 复制错误
*/
public void createFromResources(Class resourceClass) throws IOException
public <T> void createFromResources(Class<T> resourceClass) throws IOException
{
FileUtils.copy(new File(resourceClass.getResource(File.separator + fileName + "." + fileExtension).getPath()), configFile);
}
Expand Down

0 comments on commit 42927ce

Please sign in to comment.