Compare commits
7 Commits
15.8
...
developmen
Author | SHA1 | Date |
---|---|---|
JaTiTV | 76862db7c9 | |
JaTiTV | e5cba7fe6d | |
JaTiTV | 770b7daa94 | |
JaTiTV | 0f645300f4 | |
JaTiTV | 65e0082322 | |
JaTiTV | 150d9f4933 | |
JaTiTV | f40c47e6ab |
|
@ -13,6 +13,7 @@
|
|||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="16" project-jdk-type="JavaSDK" />
|
||||
</project>
|
20
pom.xml
20
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>15.8_dev</version>
|
||||
<version>16.5_DEV</version>
|
||||
<!--version>VERSION_snapshot-0</version-->
|
||||
<!--version>VERSION_beta-0</version-->
|
||||
<!--version>VERSION_dev-0</version-->
|
||||
|
@ -27,8 +27,8 @@
|
|||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<source>9</source>
|
||||
<target>9</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -118,7 +118,7 @@
|
|||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.20-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.4-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -182,19 +182,19 @@
|
|||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-minimessage</artifactId>
|
||||
<version>4.14.0</version>
|
||||
<version>4.16.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bukkit</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bungeecord</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -221,6 +221,12 @@
|
|||
<version>4.5.14</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20230227</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.md_5.bungee.api.event.PluginMessageEvent;
|
|||
import net.md_5.bungee.api.plugin.Listener;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
import net.t2code.t2codelib.Util;
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
|
@ -20,7 +21,13 @@ public class T2CplmsgBcmd implements Listener {
|
|||
try {
|
||||
String channel = stream.readUTF();
|
||||
String input = stream.readUTF();
|
||||
String serverID = stream.readUTF();
|
||||
String serverID;
|
||||
try {
|
||||
serverID = stream.readUTF();
|
||||
} catch (Exception i){
|
||||
serverID = "not Found";
|
||||
}
|
||||
|
||||
if (channel.equals("T2Code-Console")) {
|
||||
ProxyServer.getInstance().getConsole().sendMessage(Util.getPrefix()+" [§6"+serverID+"§r] §cT2C BCMD Command Console: §r"+ input);
|
||||
ProxyServer.getInstance().getPluginManager().dispatchCommand(ProxyServer.getInstance().getConsole(), input);
|
||||
|
|
|
@ -1,25 +1,70 @@
|
|||
package net.t2code.t2codelib.SPIGOT.api.commands;
|
||||
|
||||
import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug;
|
||||
import net.t2code.t2codelib.SPIGOT.system.T2CbungeeCommandSenderReciver;
|
||||
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
|
||||
import java.rmi.MarshalledObject;
|
||||
import java.util.Map;
|
||||
|
||||
public class T2Ccmd {
|
||||
public static void console(String cmd) {
|
||||
if (cmd.contains("!onBungee")){
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(null, cmd.replace("!onBungee", ""), true);
|
||||
}else Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd);
|
||||
public static void console(String cmdInput) {
|
||||
Map.Entry<String,Integer> map = delay(cmdInput);
|
||||
int delay = map.getValue();
|
||||
String cmd = map.getKey();
|
||||
Bukkit.getScheduler().runTaskLater(T2CodeLibMain.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (cmd.contains("!onBungee")) {
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(null, cmd.replace("!onBungee", ""), true);
|
||||
} else Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd);
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
public static void player(Player player, String cmd) {
|
||||
if (cmd.contains("!asConsole")) {
|
||||
if (cmd.contains("!onBungee")) {
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(player, cmd.replace("!asConsole", "").replace("!onBungee", ""), true);
|
||||
} else console(cmd.replace("!asConsole", ""));
|
||||
} else {
|
||||
if (cmd.contains("!onBungee")) {
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(player, cmd.replace("!onBungee", ""), false);
|
||||
} else player.chat("/" + cmd);
|
||||
}
|
||||
public static void player(Player player, String cmdInput) {
|
||||
Map.Entry<String,Integer> map = delay(cmdInput);
|
||||
int delay = map.getValue();
|
||||
String cmd = map.getKey();
|
||||
Bukkit.getScheduler().runTaskLater(T2CodeLibMain.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (cmd.contains("!asConsole")) {
|
||||
if (cmd.contains("!onBungee")) {
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(player, cmd.replace("!asConsole", "").replace("!onBungee", ""), true);
|
||||
} else console(cmd.replace("!asConsole", ""));
|
||||
} else {
|
||||
if (cmd.contains("!onBungee")) {
|
||||
T2CbungeeCommandSenderReciver.sendToBungee(player, cmd.replace("!onBungee", ""), false);
|
||||
} else player.chat("/" + cmd);
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
private static Map.Entry<String, Integer> delay(@NotNull String cmdInput) {
|
||||
int delay = 0;
|
||||
String cmd;
|
||||
if (cmdInput.contains("!delay:")) {
|
||||
int i = cmdInput.indexOf("!delay:") + 7;
|
||||
String s2 = cmdInput.substring(i);
|
||||
int i2 = 1;
|
||||
if(s2.contains(" ")) {
|
||||
i2 = s2.indexOf(" ");
|
||||
}else{
|
||||
i2 = s2.length();
|
||||
}
|
||||
delay = Integer.parseInt(cmdInput.substring(i, i + i2));
|
||||
cmd = cmdInput.replace("!delay:" + delay, "");
|
||||
|
||||
} else cmd = cmdInput;
|
||||
|
||||
return Map.entry(cmd, delay);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,13 +3,22 @@ package net.t2code.t2codelib.SPIGOT.api.items;
|
|||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
import org.bukkit.profile.PlayerTextures;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Base64;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -66,7 +75,13 @@ public class T2CitemBuilder {
|
|||
inventory.setItem(slot, item);
|
||||
}
|
||||
|
||||
public static ItemStack base64(String base64Value, Integer amount, String displayName, List<String> lore) {
|
||||
public static ItemStack base64(String base64Value) {
|
||||
if (!T2CmcVersion.minMc1_20() || T2CmcVersion.isNms1_20_R1()|| T2CmcVersion.isNms1_20_R2()|| T2CmcVersion.isNms1_20_R3()) {
|
||||
return base64Old(base64Value);
|
||||
} else return base64New(base64Value);
|
||||
}
|
||||
|
||||
private static ItemStack base64Old(String base64Value) {
|
||||
ItemStack itemStack = new ItemStack(T2CitemVersion.getHead());
|
||||
SkullMeta itemMeta = (SkullMeta) itemStack.getItemMeta();
|
||||
|
||||
|
@ -81,11 +96,33 @@ public class T2CitemBuilder {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
itemMeta.setDisplayName(displayName);
|
||||
itemMeta.setLore(lore);
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
|
||||
itemStack.setAmount(amount);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
private static ItemStack base64New(String base64Value) {
|
||||
ItemStack itemStack = new ItemStack(T2CitemVersion.getHead());
|
||||
SkullMeta itemMeta = (SkullMeta) itemStack.getItemMeta();
|
||||
|
||||
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
|
||||
PlayerTextures textures = profile.getTextures();
|
||||
try {
|
||||
textures.setSkin(new URL(base64Convert(base64Value)));
|
||||
} catch (MalformedURLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
profile.setTextures(textures);
|
||||
itemMeta.setOwnerProfile(profile);
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
private static String base64Convert(String base64Value) {
|
||||
String jsonString = new String(Base64.getDecoder().decode(base64Value));
|
||||
JSONObject obj = new JSONObject(jsonString);
|
||||
String output = obj.getJSONObject("textures").getJSONObject("SKIN").getString("url");
|
||||
if (output.startsWith("http://textures.minecraft.net/texture/")){
|
||||
return output;
|
||||
} else return "http://textures.minecraft.net/texture/d5d20330da59c207d78352838e91a48ea1e42b45a9893226144b251fe9b9d535";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,25 +8,11 @@ import org.bukkit.entity.Player;
|
|||
|
||||
public class T2ChoverModule {
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* The T2Code Hover Module will be removed soon,<br/>
|
||||
* please use 'T2CminiMessage.sendPlayerMiniMessage(msg, player);'<br/>
|
||||
* and the Kyori MiniMessage format!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void modulePlayer(String text, String hover, String action, String actionValue, Player player) {
|
||||
modulePlayer((text != null ? text : "null") + "/*/" + (hover != null ? hover : "null") + "/*/" + (action != null ? action : "null")
|
||||
+ "/*/" + (actionValue != null ? actionValue : "null"), player);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* The T2Code Hover Module will be removed soon,<br/>
|
||||
* please use 'T2CminiMessage.sendPlayerMiniMessage(msg, player);'<br/>
|
||||
* and the Kyori MiniMessage format!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void modulePlayer(String msg, Player player) {
|
||||
if (msg.contains("/*/")) {
|
||||
t2cmodule(msg, player);
|
||||
|
@ -35,24 +21,10 @@ public class T2ChoverModule {
|
|||
T2CminiMessage.sendPlayerMiniMessage(msg, player);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* The T2Code Hover Module will be removed soon,<br/>
|
||||
* please use 'T2CminiMessage.sendSenderMiniMessage(msg, sender);'<br/>
|
||||
* and the Kyori MiniMessage format!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void moduleSender(String msg, CommandSender sender) {
|
||||
T2CminiMessage.sendSenderMiniMessage(msg, sender);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* The T2Code Hover Module will be removed soon,<br/>
|
||||
* please use 'T2CminiMessage.sendPlayerMiniMessage(msg, player);'<br/>
|
||||
* and the Kyori MiniMessage format!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void moduleConsole(String msg) {
|
||||
if (T2CodeLibMain.getMmIsLoad()) {
|
||||
T2CminiMessage.sendConsoleMiniMessage(msg);
|
||||
|
@ -61,13 +33,6 @@ public class T2ChoverModule {
|
|||
Bukkit.getConsoleSender().sendMessage(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* The T2Code Hover Module will be removed soon,<br/>
|
||||
* please use 'T2CminiMessage.sendPlayerMiniMessage(msg, player);'<br/>
|
||||
* and the Kyori MiniMessage format!
|
||||
*/
|
||||
@Deprecated
|
||||
private static void t2cmodule(String msg, Player player) {
|
||||
String[] split = msg.split("/\\*/");
|
||||
int i = split.length;
|
||||
|
|
|
@ -11,7 +11,12 @@ public class T2CminiMessage {
|
|||
private static final BukkitAudiences bukkitAudiences = T2CodeLibMain.getPlugin().getAdventure();
|
||||
|
||||
public static void sendSenderMiniMessage(String msg, CommandSender sender) {
|
||||
bukkitAudiences.sender(sender).sendMessage(replace(msg));
|
||||
String string = "";
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
string =T2Creplace.replace("",player,msg);
|
||||
} else string = msg;
|
||||
bukkitAudiences.sender(sender).sendMessage(replace(string));
|
||||
}
|
||||
|
||||
public static void sendConsoleMiniMessage(String msg) {
|
||||
|
@ -19,7 +24,7 @@ public class T2CminiMessage {
|
|||
}
|
||||
|
||||
public static void sendPlayerMiniMessage(String msg, Player player) {
|
||||
bukkitAudiences.player(player).sendMessage(replace(msg));
|
||||
bukkitAudiences.player(player).sendMessage(replace(T2Creplace.replace("", player, msg)));
|
||||
}
|
||||
|
||||
protected static Component replace(String text) {
|
||||
|
|
|
@ -7,71 +7,47 @@ import org.bukkit.entity.Player;
|
|||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class T2Csend {
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void console(String msg) {
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.moduleConsole(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void player(Player player, String msg) {
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.modulePlayer(msg, player);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void sender(CommandSender sender, String msg) {
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.moduleSender(msg, sender);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void console(Object object) {
|
||||
String msg = String.valueOf(object);
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.moduleConsole(msg);
|
||||
for (String msg : list(object)){
|
||||
if (msg == null || msg.contains("[empty]")) continue;
|
||||
T2ChoverModule.moduleConsole(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
public static void player(Player player, Object object) {
|
||||
String msg = String.valueOf(object);
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.modulePlayer(msg, player);
|
||||
for (String msg : list(object)){
|
||||
if (msg == null || msg.contains("[empty]")) continue;
|
||||
T2ChoverModule.modulePlayer(msg, player);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated reason this method is deprecated <br/>
|
||||
* Please note that these methods will be rebuilt to MiniMessage in the future and from then on the T2Code Hover Module will be removed!
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
public static void sender(CommandSender sender, Object object) {
|
||||
String msg = String.valueOf(object);
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.moduleSender(msg, sender);
|
||||
for (String msg : list(object)){
|
||||
if (msg == null || msg.contains("[empty]")) return;
|
||||
T2ChoverModule.moduleSender(msg, sender);
|
||||
}
|
||||
}
|
||||
|
||||
public static void title(Player player, @Nullable String title, @Nullable String subtitle) {
|
||||
|
@ -106,4 +82,16 @@ public class T2Csend {
|
|||
public static void error(Plugin plugin, String msg) {
|
||||
plugin.getLogger().log(Level.SEVERE, msg);
|
||||
}
|
||||
|
||||
private static ArrayList<String> list(Object object){
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
|
||||
if (object instanceof List){
|
||||
list= (ArrayList<String>) object;
|
||||
}
|
||||
if (object instanceof String){
|
||||
list.add((String) object);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ public class T2CmcVersion {
|
|||
nms1_19_R2 = nms.contains("1_19_R2");
|
||||
nms1_20_R1 = nms.contains("1_20_R1");
|
||||
nms1_20_R2 = nms.contains("1_20_R2");
|
||||
nms1_20_R2 = nms.contains("1_20_R3");
|
||||
nms1_20_R2 = nms.contains("1_20_R4");
|
||||
nms1_21_R1 = nms.contains("1_21_R1");
|
||||
}
|
||||
|
||||
|
@ -88,6 +90,8 @@ public class T2CmcVersion {
|
|||
private static boolean nms1_19_R2;
|
||||
private static boolean nms1_20_R1;
|
||||
private static boolean nms1_20_R2;
|
||||
private static boolean nms1_20_R3;
|
||||
private static boolean nms1_20_R4;
|
||||
private static boolean nms1_21_R1;
|
||||
|
||||
public static String getMcVersion() {
|
||||
|
@ -149,6 +153,7 @@ public class T2CmcVersion {
|
|||
public static boolean isMc1_20() {
|
||||
return mc1_20;
|
||||
}
|
||||
|
||||
public static boolean isMc1_21() {
|
||||
return mc1_21;
|
||||
}
|
||||
|
@ -243,7 +248,12 @@ public class T2CmcVersion {
|
|||
|
||||
public static boolean isNms1_20_R2() {
|
||||
return nms1_20_R2;
|
||||
}public static boolean isNms1_20_R3() {
|
||||
return nms1_20_R3;
|
||||
}public static boolean isNms1_20_R4() {
|
||||
return nms1_20_R4;
|
||||
}
|
||||
|
||||
public static boolean isNms1_21_R1() {
|
||||
return nms1_21_R1;
|
||||
}
|
||||
|
@ -270,7 +280,7 @@ public class T2CmcVersion {
|
|||
}
|
||||
|
||||
public static boolean minMc1_13() {
|
||||
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() ;
|
||||
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12();
|
||||
}
|
||||
|
||||
public static boolean minMc1_14() {
|
||||
|
@ -278,7 +288,7 @@ public class T2CmcVersion {
|
|||
}
|
||||
|
||||
public static boolean minMc1_15() {
|
||||
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() ;
|
||||
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14();
|
||||
}
|
||||
|
||||
public static boolean minMc1_16() {
|
||||
|
|
|
@ -53,6 +53,10 @@ public class T2CupdateCheckerGit {
|
|||
);
|
||||
|
||||
T2CupdateAPI.pluginVersions.put(plugin.getName(), update);
|
||||
if (T2CupdateAPI.pluginVersions.get(plugin.getName()) == null){
|
||||
T2Csend.debugmsg(T2CodeLibMain.getPlugin(),plugin.getName() + " UpdateAPI T2CupdateAPI.pluginVersions.get(plugin.getName()) == null");
|
||||
return;
|
||||
}
|
||||
if (T2CupdateAPI.pluginVersions.get(plugin.getName()).updateAvailable) {
|
||||
if (!update.load) {
|
||||
new BukkitRunnable() {
|
||||
|
@ -74,7 +78,7 @@ public class T2CupdateCheckerGit {
|
|||
|
||||
}, plugin.getDescription().getVersion(), spigotID, finalRepoURL, updateCheckOnJoin, seePreReleaseUpdates, timeInterval);
|
||||
}
|
||||
}, 0L, finalInterval * 60 * 20L);
|
||||
}, 10L, finalInterval * 60 * 20L);
|
||||
}
|
||||
|
||||
public void getVersion(Consumer<T2CupdateWebData> consumer, String pluginVersion, Integer spigotID, String URL, Boolean updateCheckOnJoin, Boolean seePreReleaseUpdates, Integer timeInterval) {
|
||||
|
|
|
@ -62,10 +62,10 @@ public final class T2CodeLibMain extends JavaPlugin {
|
|||
}
|
||||
T2CmcVersion.onCheck();
|
||||
|
||||
if (T2CmcVersion.isNms1_20_R2()) {
|
||||
if (T2CmcVersion.isNms1_20_R4()) {
|
||||
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
|
||||
T2Csend.console(prefix);
|
||||
T2Csend.warning(plugin, "The 1.20.* (NMS R2) is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
|
||||
T2Csend.warning(plugin, "The 1.20.* (NMS R4) is a very fresh / new version. If there are any bugs in our plugins, please report them to us via our Discord: http://dc.t2code.net");
|
||||
T2Csend.console(prefix);
|
||||
T2Csend.console(prefix + " §4!!!!!!!!!!!!!!!!!!!!");
|
||||
if (!SelectLibConfig.getT2cTestDevelopment()) {
|
||||
|
|
|
@ -198,7 +198,7 @@ public class CreateReportLog {
|
|||
"<br>[prefix] <green>You can download it <click:open_url:'[url]'><gold><hover:show_text:'<yellow>Download the debug file</yellow>'>here</hover></gold></click>." +
|
||||
"<br>[prefix] <green>Please enter the following key in the ticket: <gold><click:copy_to_clipboard:[key]><hover:show_text:'<yellow>Copy to clipboard</yellow>'>[key]</hover></click></gold></green>" +
|
||||
"<br>[prefix] <dark_red>Do not share the download URL with anyone!</dark_red>" +
|
||||
"<br><hover:show_text:'<yellow>Click to delete</yellow>'><click:run_command:'/t2code debug deleteReportLog [key]'>[prefix] <green>You can <b>delte</b> yor Debug-File by clicking me.</green>" +
|
||||
"<br>[prefix] <click:run_command:'/t2code debug deleteReportLog [key]'><hover:show_text:'<yellow>Click to delete</yellow>'><green>You can <b>delete</b> your Debug-File by clicking me.</green>" +
|
||||
"<br>[prefix] <color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color></click></hover>")
|
||||
.replace("[key]", fileID).replace("[url]", downloadURL).replace("[prefix]", Util.getPrefix()));
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ public class CreateReportLog {
|
|||
"<br><gold>Please enter the following key in the ticket:</gold> <yellow>[key]</yellow>." +
|
||||
"<br><dark_red>Do not share the download URL with anyone!</dark_red>" +
|
||||
"<br><color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color>" +
|
||||
"<br><dark_red>You can delte yor Debug-File with the following command:</dark_red> <red>/t2code debug deleteReportLog [key]</red>.")
|
||||
"<br><dark_red>You can delete your Debug-File with the following command:</dark_red> <red>/t2code debug deleteReportLog [key]</red>.")
|
||||
.replace("[key]", fileID).replace("[url]", downloadURL));
|
||||
ReportLogStorage.add(fileID);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue