11.4
This commit is contained in:
parent
dab150407c
commit
e3c1217f86
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>11.2</version>
|
<version>11.4</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2CodeLib</name>
|
<name>T2CodeLib</name>
|
||||||
|
@ -7,10 +7,34 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
public class ItemVersion {
|
public class ItemVersion {
|
||||||
private static Material Head;
|
private static Material Head;
|
||||||
private static ItemStack HeadIS;
|
private static ItemStack HeadIS;
|
||||||
|
private static ItemStack CRAFTING_TABLE;
|
||||||
|
private static ItemStack YELLOW_WOOL;
|
||||||
|
private static ItemStack ORANGE_WOOL;
|
||||||
|
private static ItemStack GREEN_WOOL;
|
||||||
|
private static ItemStack GRAY_WOOL;
|
||||||
|
private static ItemStack RED_WOOL;
|
||||||
|
private static ItemStack RED_STAINED_GLASS_PANE;
|
||||||
|
|
||||||
public static void scan(){
|
public static void scan(){
|
||||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||||
Head = Material.valueOf("SKULL");
|
Head = Material.valueOf("SKULL");
|
||||||
} else Head = Material.valueOf("PLAYER_HEAD");
|
YELLOW_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 4);
|
||||||
|
ORANGE_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 1);
|
||||||
|
GREEN_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 5);
|
||||||
|
GRAY_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 8);
|
||||||
|
RED_WOOL = new ItemStack(Material.valueOf("WOOL"), 1, (short) 14);
|
||||||
|
RED_STAINED_GLASS_PANE = new ItemStack(Material.valueOf("STAINED_GLASS_PANE"), 1, (short) 14);
|
||||||
|
CRAFTING_TABLE = new ItemStack(Material.valueOf("WORKBENCH"));
|
||||||
|
} else {
|
||||||
|
Head = Material.valueOf("PLAYER_HEAD");
|
||||||
|
CRAFTING_TABLE = new ItemStack(Material.CRAFTING_TABLE);
|
||||||
|
YELLOW_WOOL = new ItemStack(Material.YELLOW_WOOL);
|
||||||
|
ORANGE_WOOL = new ItemStack(Material.ORANGE_WOOL);
|
||||||
|
GREEN_WOOL = new ItemStack(Material.GREEN_WOOL);
|
||||||
|
GRAY_WOOL = new ItemStack(Material.GRAY_WOOL);
|
||||||
|
RED_WOOL = new ItemStack(Material.RED_WOOL);
|
||||||
|
RED_STAINED_GLASS_PANE = new ItemStack(Material.RED_STAINED_GLASS_PANE);
|
||||||
|
}
|
||||||
HeadIS = new ItemStack(Head);
|
HeadIS = new ItemStack(Head);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,4 +45,32 @@ public class ItemVersion {
|
|||||||
public static ItemStack getHeadIS() {
|
public static ItemStack getHeadIS() {
|
||||||
return HeadIS;
|
return HeadIS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ItemStack getCraftingTable() {
|
||||||
|
return CRAFTING_TABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getYellowWool() {
|
||||||
|
return YELLOW_WOOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getOrangeWool() {
|
||||||
|
return ORANGE_WOOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getGreenWool() {
|
||||||
|
return GREEN_WOOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getGrayWool() {
|
||||||
|
return GRAY_WOOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getRedWool() {
|
||||||
|
return RED_WOOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getRedStainedGlassPane() {
|
||||||
|
return RED_STAINED_GLASS_PANE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ public class NMSVersion {
|
|||||||
public static boolean v1_17_R1;
|
public static boolean v1_17_R1;
|
||||||
public static boolean v1_18_R1;
|
public static boolean v1_18_R1;
|
||||||
public static boolean v1_18_R2;
|
public static boolean v1_18_R2;
|
||||||
|
public static boolean v1_19_R1;
|
||||||
|
|
||||||
public static void onCheck() {
|
public static void onCheck() {
|
||||||
isNMS = Bukkit.getServer().getClass().getPackage().getName();
|
isNMS = Bukkit.getServer().getClass().getPackage().getName();
|
||||||
@ -43,5 +44,6 @@ public class NMSVersion {
|
|||||||
v1_17_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_17_R1");
|
v1_17_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_17_R1");
|
||||||
v1_18_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R1");
|
v1_18_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R1");
|
||||||
v1_18_R2 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R2");
|
v1_18_R2 = Bukkit.getServer().getClass().getPackage().getName().contains("1_18_R2");
|
||||||
|
v1_19_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_19_R1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,9 @@ public class PluginCheck {
|
|||||||
public static Boolean luckyBox(){
|
public static Boolean luckyBox(){
|
||||||
return Bukkit.getPluginManager().getPlugin("T2C-LuckyBox") != null;
|
return Bukkit.getPluginManager().getPlugin("T2C-LuckyBox") != null;
|
||||||
}
|
}
|
||||||
|
public static Boolean autoResponse(){
|
||||||
|
return Bukkit.getPluginManager().getPlugin("T2C-AutoResponse") != null;
|
||||||
|
}
|
||||||
public static Boolean opSec(){
|
public static Boolean opSec(){
|
||||||
return Bukkit.getPluginManager().getPlugin("OPSecurity") != null;
|
return Bukkit.getPluginManager().getPlugin("OPSecurity") != null;
|
||||||
}
|
}
|
||||||
@ -53,7 +56,7 @@ public class PluginCheck {
|
|||||||
return Bukkit.getPluginManager().getPlugin("Booster") != null;
|
return Bukkit.getPluginManager().getPlugin("Booster") != null;
|
||||||
}
|
}
|
||||||
public static Boolean antiMapCopy(){
|
public static Boolean antiMapCopy(){
|
||||||
return Bukkit.getPluginManager().getPlugin("AAntiMapCopy") != null;
|
return Bukkit.getPluginManager().getPlugin("AntiMapCopy") != null;
|
||||||
}
|
}
|
||||||
public static Boolean loreEditor(){
|
public static Boolean loreEditor(){
|
||||||
return Bukkit.getPluginManager().getPlugin("LoreEditor") != null;
|
return Bukkit.getPluginManager().getPlugin("LoreEditor") != null;
|
||||||
|
@ -26,7 +26,7 @@ public class UpdateAPI {
|
|||||||
|
|
||||||
public static void join(Plugin plugin, String prefix, String perm, Player player, String spigot, String discord) {
|
public static void join(Plugin plugin, String prefix, String perm, Player player, String spigot, String discord) {
|
||||||
String pluginVersion = plugin.getDescription().getVersion();
|
String pluginVersion = plugin.getDescription().getVersion();
|
||||||
if (!player.hasPermission(perm) || !player.isOp()) {
|
if (!player.hasPermission(perm) && !player.isOp()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (UpdateAPI.PluginVersionen.get(plugin.getName()) == null) {
|
if (UpdateAPI.PluginVersionen.get(plugin.getName()) == null) {
|
||||||
|
@ -32,7 +32,8 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
|
|||||||
}
|
}
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
||||||
} else {
|
return false;
|
||||||
|
}
|
||||||
switch (args[0].toLowerCase()) {
|
switch (args[0].toLowerCase()) {
|
||||||
case "info":
|
case "info":
|
||||||
case "plugin":
|
case "plugin":
|
||||||
@ -41,20 +42,20 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
|
|||||||
case "ver":
|
case "ver":
|
||||||
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
T2CodeTemplate.sendInfo(sender, Util.getPrefix(), Util.getSpigot(), Util.getDiscord(), Main.autor, Main.version, UpdateAPI.PluginVersionen.get(Main.plugin.getName()).publicVersion);
|
||||||
return false;
|
return false;
|
||||||
}
|
case "debug":
|
||||||
if ("debug".equals(args[0].toLowerCase())) {
|
|
||||||
if (args.length != 2) {
|
if (args.length != 2) {
|
||||||
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ("createreportlog".equals(args[1].toLowerCase())) {
|
if ("createreportlog".equals(args[1].toLowerCase())) {
|
||||||
|
|
||||||
CreateReportLog.create(sender);
|
CreateReportLog.create(sender);
|
||||||
|
|
||||||
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
} else send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
default:
|
||||||
|
send.sender(sender, "§4Use: §7/t2code debug createReportLog");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
|||||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
||||||
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
||||||
import net.t2code.lib.Spigot.Lib.vault.Vault;
|
import net.t2code.lib.Spigot.Lib.vault.Vault;
|
||||||
|
import net.t2code.lib.Util;
|
||||||
import net.t2code.luckyBox.api.LuckyBoxAPI;
|
import net.t2code.luckyBox.api.LuckyBoxAPI;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@ -20,7 +20,6 @@ import java.util.Calendar;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
|
||||||
public class CreateReportLog {
|
public class CreateReportLog {
|
||||||
protected static void create(CommandSender sender) {
|
protected static void create(CommandSender sender) {
|
||||||
send.sender(sender, Main.prefix + " §6A DebugLog is created...");
|
send.sender(sender, Main.prefix + " §6A DebugLog is created...");
|
||||||
@ -102,24 +101,26 @@ public class CreateReportLog {
|
|||||||
zip.putNextEntry(new ZipEntry(fileToZip.getName()));
|
zip.putNextEntry(new ZipEntry(fileToZip.getName()));
|
||||||
Files.copy(fileToZip.toPath(), zip);
|
Files.copy(fileToZip.toPath(), zip);
|
||||||
|
|
||||||
//File logToZip = new File(log);
|
|
||||||
//zipOut.putNextEntry(new ZipEntry(logToZip.getName()));
|
|
||||||
//Files.copy(logToZip.toPath(), zipOut);
|
|
||||||
|
|
||||||
addFileToZip("", "logs/latest.log", zip, false);
|
addFileToZip("", "logs/latest.log", zip, false);
|
||||||
|
|
||||||
//pluginToDebug("T2CodeLib", "T2CodeLib", zip); todo bugfix (servercrash)
|
for (String pl : Util.getT2cPlugins()){
|
||||||
pluginToDebug("T2C-LuckyBox", "T2C-LuckyBox", zip);
|
pluginToDebug(pl, zip);
|
||||||
pluginToDebug("WonderBagShop", "WonderBagShop", zip);
|
}
|
||||||
pluginToDebug("CommandGUI", "CommandGUI", zip);
|
|
||||||
pluginToDebug("OPSecurity", "OPSecurity", zip);
|
//pluginToDebug("T2C-LuckyBox", zip);
|
||||||
pluginToDebug("PaPiTest", "PaPiTest", zip);
|
//pluginToDebug("WonderBagShop", zip);
|
||||||
pluginToDebug("PlotSquaredGUI", "PlotSquaredGUI", zip);
|
//pluginToDebug("CommandGUI", zip);
|
||||||
pluginToDebug("T2C-Alias", "T2Code-Alias", zip);
|
//pluginToDebug("OPSecurity", zip);
|
||||||
|
//pluginToDebug("PaPiTest", zip);
|
||||||
|
//pluginToDebug("PlotSquaredGUI", zip);
|
||||||
|
//pluginToDebug("T2C-Alias", zip);
|
||||||
|
//pluginToDebug("T2C-AutoResponse", zip);
|
||||||
|
//
|
||||||
|
//pluginToDebug("LoreEditor", zip);
|
||||||
|
//pluginToDebug("Booster", zip);
|
||||||
|
//pluginToDebug("AntiMapCopy", zip);
|
||||||
|
//pluginToDebug("AntiCopy", zip);
|
||||||
|
|
||||||
pluginToDebug("LoreEditor", "LoreEditor", zip);
|
|
||||||
pluginToDebug("Booster", "Booster", zip);
|
|
||||||
pluginToDebug("AntiMapCopy", "AntiCopy", zip);
|
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
zip.close();
|
zip.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -133,7 +134,7 @@ public class CreateReportLog {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void pluginToDebug(String pluginName, String jar, ZipOutputStream zip) throws IOException {
|
private static void pluginToDebug(String pluginName, ZipOutputStream zip) throws IOException {
|
||||||
if (PluginCheck.pluginCheck(pluginName)) {
|
if (PluginCheck.pluginCheck(pluginName)) {
|
||||||
Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName);
|
Plugin plugin = Bukkit.getPluginManager().getPlugin(pluginName);
|
||||||
File plConfigs = new File(plugin.getDataFolder().getPath());
|
File plConfigs = new File(plugin.getDataFolder().getPath());
|
||||||
@ -144,7 +145,7 @@ public class CreateReportLog {
|
|||||||
File[] fileArray = f.listFiles();
|
File[] fileArray = f.listFiles();
|
||||||
|
|
||||||
for (File config : fileArray) {
|
for (File config : fileArray) {
|
||||||
if (config.getName().contains(jar) && config.getName().contains(".jar")) {
|
if (config.getName().contains(pluginName) && config.getName().contains(".jar")) {
|
||||||
addFileToZip("T2Code-Plugins", config.getPath(), zip, false);
|
addFileToZip("T2Code-Plugins", config.getPath(), zip, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,6 @@ private static String prefix = Main.prefix;
|
|||||||
VaultNotSetUp = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.VaultNotSetUp"));
|
VaultNotSetUp = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.VaultNotSetUp"));
|
||||||
SoundNotFound = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.SoundNotFound"));
|
SoundNotFound = Replace.replace(prefix, yamlConfiguration_msg.getString("Plugin.SoundNotFound"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
send.console(Prefix + " §2Language successfully selected to: §6" + selectMSG + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package net.t2code.lib;
|
package net.t2code.lib;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Util {
|
public class Util {
|
||||||
private static Boolean Snapshot = false;
|
private static Boolean Snapshot = false;
|
||||||
|
|
||||||
@ -32,4 +35,24 @@ public class Util {
|
|||||||
public static Boolean getSnapshot(){
|
public static Boolean getSnapshot(){
|
||||||
return Snapshot;
|
return Snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<String> getT2cPlugins() {
|
||||||
|
return t2cPlugins;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<String> t2cPlugins =
|
||||||
|
Arrays.asList(
|
||||||
|
"T2C-LuckyBox",
|
||||||
|
"WonderBagShop",
|
||||||
|
"CommandGUI",
|
||||||
|
"OPSecurity",
|
||||||
|
"PaPiTest",
|
||||||
|
"PlotSquaredGUI",
|
||||||
|
"T2C-Alias",
|
||||||
|
"T2C-AutoResponse",
|
||||||
|
"LoreEditor",
|
||||||
|
"Booster",
|
||||||
|
"AntiMapCopy",
|
||||||
|
"AntiCopy"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: T2CodeLib
|
name: T2CodeLib
|
||||||
version: 11.2
|
version: 11.4
|
||||||
main: net.t2code.lib.Bungee.BMain
|
main: net.t2code.lib.Bungee.BMain
|
||||||
author: JaTiTV, Jkobs
|
author: JaTiTV, Jkobs
|
||||||
description: Libarie from T2Code Plugins
|
description: Libarie from T2Code Plugins
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
name: T2CodeLib
|
name: T2CodeLib
|
||||||
version: 11.2
|
version: 11.4
|
||||||
main: net.t2code.lib.Spigot.system.Main
|
main: net.t2code.lib.Spigot.system.Main
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
prefix: T2CodeLib
|
prefix: T2CodeLib
|
||||||
|
Loading…
Reference in New Issue
Block a user