fix forge
This commit is contained in:
parent
5fe59ca797
commit
fa432ff741
@ -5,7 +5,7 @@ plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '4.0.4'
|
||||
}
|
||||
group = 'me.skymc'
|
||||
version = '5.0'
|
||||
version = '5.01'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
@ -63,10 +63,7 @@ processResources {
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include '__resources__/version'
|
||||
include 'plugin.yml'
|
||||
expand 'version': project.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude '__resources__/version'
|
||||
}
|
||||
}
|
5
src/main/resources/plugin.yml
Normal file
5
src/main/resources/plugin.yml
Normal file
@ -0,0 +1,5 @@
|
||||
name: TabooLib5
|
||||
main: io.izzel.taboolib.common.plugin.InternalJavaPlugin
|
||||
version: ${version}
|
||||
|
||||
author: 坏黑
|
@ -74,6 +74,10 @@ public class SQLTable {
|
||||
return executeUpdate("insert into " + tableName + " values(" + queryValues + ")");
|
||||
}
|
||||
|
||||
public RunnableUpdate executeUpdateIfDuplicate(String queryValues, String queryUpdate) {
|
||||
return executeUpdate("insert into " + tableName + " values(" + queryValues + ") on duplicate key update " + queryUpdate);
|
||||
}
|
||||
|
||||
public RunnableUpdate executeUpdate(String query) {
|
||||
return new RunnableUpdate(query);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.izzel.taboolib.util;
|
||||
import io.izzel.taboolib.TabooLib;
|
||||
import io.izzel.taboolib.common.plugin.InternalPlugin;
|
||||
import io.izzel.taboolib.module.inject.TSchedule;
|
||||
import io.izzel.taboolib.util.plugin.PluginUtils;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@ -73,7 +74,8 @@ public class Files {
|
||||
public static InputStream getCanonicalResource(Plugin plugin, String filename) {
|
||||
File file = file(new File("plugins/TabooLib/temp/" + UUID.randomUUID()));
|
||||
try {
|
||||
ZipFile zipFile = new ZipFile(toFile(plugin.getClass().getProtectionDomain().getCodeSource().getLocation().openStream(), file));
|
||||
copy(plugin instanceof InternalPlugin ? new File("libs/TabooLib.jar") : PluginUtils.getPluginFile(plugin), file);
|
||||
ZipFile zipFile = new ZipFile(file);
|
||||
ZipEntry entry = zipFile.getEntry(filename);
|
||||
if (entry != null) {
|
||||
return zipFile.getInputStream(entry);
|
||||
|
Loading…
Reference in New Issue
Block a user