+ fixed TabooLibDeprecated.jar
This commit is contained in:
parent
e008b62b61
commit
beff113531
Binary file not shown.
@ -7,6 +7,7 @@ import com.ilummc.tlib.util.IO;
|
|||||||
import com.ilummc.tlib.util.Strings;
|
import com.ilummc.tlib.util.Strings;
|
||||||
import me.skymc.taboolib.database.GlobalDataManager;
|
import me.skymc.taboolib.database.GlobalDataManager;
|
||||||
import me.skymc.taboolib.database.PlayerDataManager;
|
import me.skymc.taboolib.database.PlayerDataManager;
|
||||||
|
import me.skymc.taboolib.economy.EcoUtils;
|
||||||
import me.skymc.taboolib.fileutils.ConfigUtils;
|
import me.skymc.taboolib.fileutils.ConfigUtils;
|
||||||
import me.skymc.taboolib.fileutils.FileUtils;
|
import me.skymc.taboolib.fileutils.FileUtils;
|
||||||
import me.skymc.taboolib.listener.TListenerHandler;
|
import me.skymc.taboolib.listener.TListenerHandler;
|
||||||
@ -16,8 +17,6 @@ import me.skymc.taboolib.other.NumberUtils;
|
|||||||
import me.skymc.taboolib.playerdata.DataUtils;
|
import me.skymc.taboolib.playerdata.DataUtils;
|
||||||
import me.skymc.taboolib.socket.TabooLibClient;
|
import me.skymc.taboolib.socket.TabooLibClient;
|
||||||
import me.skymc.taboolib.socket.TabooLibServer;
|
import me.skymc.taboolib.socket.TabooLibServer;
|
||||||
import me.skymc.taboolib.string.language2.Language2;
|
|
||||||
import net.milkbowl.vault.economy.Economy;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@ -45,11 +44,9 @@ public class Main extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Plugin inst;
|
private static Plugin inst;
|
||||||
private static Economy economy;
|
|
||||||
private static File playerDataFolder;
|
private static File playerDataFolder;
|
||||||
private static File serverDataFolder;
|
private static File serverDataFolder;
|
||||||
private static StorageType storageType = StorageType.LOCAL;
|
private static StorageType storageType = StorageType.LOCAL;
|
||||||
private static Language2 exampleLanguage2;
|
|
||||||
private static boolean disable = false;
|
private static boolean disable = false;
|
||||||
private static boolean started = false;
|
private static boolean started = false;
|
||||||
private static boolean isInternetOnline = false;
|
private static boolean isInternetOnline = false;
|
||||||
@ -138,8 +135,6 @@ public class Main extends JavaPlugin {
|
|||||||
}.runTask(this);
|
}.runTask(this);
|
||||||
// 启动
|
// 启动
|
||||||
started = true;
|
started = true;
|
||||||
// 载入语言文件
|
|
||||||
exampleLanguage2 = new Language2("Language2", this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -198,14 +193,6 @@ public class Main extends JavaPlugin {
|
|||||||
return "§8[§3§lTabooLib§8] §7";
|
return "§8[§3§lTabooLib§8] §7";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.milkbowl.vault.economy.Economy getEconomy() {
|
|
||||||
return economy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setEconomy(Economy economy) {
|
|
||||||
Main.economy = economy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static File getPlayerDataFolder() {
|
public static File getPlayerDataFolder() {
|
||||||
return playerDataFolder;
|
return playerDataFolder;
|
||||||
}
|
}
|
||||||
@ -222,26 +209,10 @@ public class Main extends JavaPlugin {
|
|||||||
return disable;
|
return disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MySQLConnection getConnection() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Language2 getExampleLanguage2() {
|
|
||||||
return exampleLanguage2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isStarted() {
|
public static boolean isStarted() {
|
||||||
return started;
|
return started;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Random getRandom() {
|
|
||||||
return NumberUtils.getRandom();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getTablePrefix() {
|
|
||||||
return inst.getConfig().getString("MYSQL.PREFIX");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isInternetOnline() {
|
public static boolean isInternetOnline() {
|
||||||
return isInternetOnline;
|
return isInternetOnline;
|
||||||
}
|
}
|
||||||
@ -254,6 +225,26 @@ public class Main extends JavaPlugin {
|
|||||||
return TLib.getTLib().getLibsFolder().listFiles().length > 0;
|
return TLib.getTLib().getLibsFolder().listFiles().length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static Random getRandom() {
|
||||||
|
return NumberUtils.getRandom();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static String getTablePrefix() {
|
||||||
|
return inst.getConfig().getString("MYSQL.PREFIX");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static MySQLConnection getConnection() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static net.milkbowl.vault.economy.Economy getEconomy() {
|
||||||
|
return EcoUtils.getEconomy();
|
||||||
|
}
|
||||||
|
|
||||||
// *********************************
|
// *********************************
|
||||||
//
|
//
|
||||||
// Private Setter
|
// Private Setter
|
||||||
|
@ -160,11 +160,13 @@ public class TabooLibLoader implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void setupAddons() {
|
static void setupAddons() {
|
||||||
TabooLib.instance().saveResource("Addons/TabooLibDeprecated", true);
|
File origin = new File(TabooLib.instance().getDataFolder(), "Addons/TabooLibDeprecated.jar");
|
||||||
|
origin.delete();
|
||||||
// 傻逼 Gradle 的 shadow 插件会将所有 jar 排除
|
// 傻逼 Gradle 的 shadow 插件会将所有 jar 排除
|
||||||
// https://github.com/johnrengelman/shadow/issues/276
|
// https://github.com/johnrengelman/shadow/issues/276
|
||||||
|
TabooLib.instance().saveResource("Addons/TabooLibDeprecated", true);
|
||||||
File from = new File(TabooLib.instance().getDataFolder(), "Addons/TabooLibDeprecated");
|
File from = new File(TabooLib.instance().getDataFolder(), "Addons/TabooLibDeprecated");
|
||||||
from.renameTo(new File(TabooLib.instance().getDataFolder(), "Addons/TabooLibDeprecated.jar"));
|
from.renameTo(origin);
|
||||||
from.delete();
|
from.delete();
|
||||||
File file = new File(TabooLib.instance().getDataFolder(), "Addons");
|
File file = new File(TabooLib.instance().getDataFolder(), "Addons");
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user