Compare commits

...

4 Commits

Author SHA1 Message Date
2f7f8e3bee Update T2C_McVersion.java
add minMC1_21()
2024-07-11 13:25:40 +02:00
987af06fb4 small code changes 2024-07-11 13:25:13 +02:00
311ae66d18 Update pom.xml 2024-07-11 13:24:34 +02:00
8ae50fcbbf Update T2C_Cmd.java
Add PlaceholderAPI to Player send Command
2024-07-11 13:24:29 +02:00
6 changed files with 10 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>16.7_dev-24</version>
<version>16.7_dev-27</version>
<!--version>VERSION_snapshot-0</version-->
<!--version>VERSION_beta-0</version-->
<!--version>VERSION_dev-0</version-->

View File

@ -1,5 +1,6 @@
package net.t2code.t2codelib.SPIGOT.api.commands;
import me.clip.placeholderapi.PlaceholderAPI;
import net.t2code.t2codelib.SPIGOT.system.T2C_ProxyCommandSenderReceiver;
import net.t2code.t2codelib.SPIGOT.system.T2C_Main;
import org.bukkit.Bukkit;
@ -24,7 +25,7 @@ public class T2C_Cmd {
}
public static void player(Player player, String cmdInput) {
Map.Entry<String,Integer> map = delay(cmdInput);
Map.Entry<String,Integer> map = delay(PlaceholderAPI.setPlaceholders(player, cmdInput));
int delay = map.getValue();
String cmd = map.getKey();
Bukkit.getScheduler().runTaskLater(T2C_Main.getPlugin(), new Runnable() {

View File

@ -7,7 +7,6 @@ import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public class T2C_Replace {

View File

@ -330,4 +330,8 @@ public class T2C_McVersion {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16() && !isMc1_17()
&& !isMc1_18() && !isMc1_19();
}
public static boolean minMc1_21() {
return !isMc1_8() && !isMc1_9() && !isMc1_10() && !isMc1_11() && !isMc1_12() && !isMc1_13() && !isMc1_14() && !isMc1_15() && !isMc1_16() && !isMc1_17()
&& !isMc1_18() && !isMc1_19() && !isMc1_20();
}
}

View File

@ -61,6 +61,8 @@ public class T2C_ConfigWriter {
}
}
// Copy default values if they are missing
config.options().copyDefaults(true);

View File

@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map;
public class T2C_YmlWriter {
protected static void saveConfigWithComments(File file, FileConfiguration config, Map<String, List<String>> comments, boolean oneListToString,String... headers) {
public static void saveConfigWithComments(File file, FileConfiguration config, Map<String, List<String>> comments, boolean oneListToString,String... headers) {
try {
StringBuilder configContent = new StringBuilder();
for (String h : headers) {