Compare commits

...

2 Commits

Author SHA1 Message Date
3aee76ddb8 T2Csend.debug() -> T2Cdebug.debug() / add T2Cdebug.debugCode() 2023-04-23 12:30:56 +02:00
65ff4ee24a 14.4 / kiori update 2023-04-23 12:29:38 +02:00
3 changed files with 45 additions and 18 deletions

10
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>14.4_DEV-6</version>
<version>14.4</version>
<packaging>jar</packaging>
<name>T2CodeLib</name>
@ -171,7 +171,7 @@
<dependency>
<groupId>com.bencodez</groupId>
<artifactId>votingplugin</artifactId>
<version>6.10.0</version>
<version>6.12.1</version>
<scope>provided</scope>
</dependency>
@ -179,19 +179,19 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.12.0</version>
<version>4.13.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.2.0</version>
<version>4.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bungeecord</artifactId>
<version>4.2.0</version>
<version>4.3.0</version>
<scope>compile</scope>
</dependency>

View File

@ -0,0 +1,37 @@
package net.t2code.t2codelib.SPIGOT.api.debug;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import java.util.UUID;
public class T2Cdebug {
public static void debug(Plugin plugin, String msg) {
debug(plugin, msg, null);
}
public static void debug(Plugin plugin, String msg, Integer stage) {
// if (!new File(Main.getPath(), "config.yml").exists()) return;
if (stage == null) {
if (plugin.getConfig().getBoolean("Plugin.Debug") || plugin.getConfig().getBoolean("plugin.debug") || plugin.getConfig().getBoolean("Debug") || plugin.getConfig().getBoolean("debug")){
T2Csend.info(plugin, "");
Bukkit.getConsoleSender().sendMessage(plugin.getDescription().getPrefix() + " §5DEBUG: §6" + msg);
}
return;
}
if (plugin.getConfig().getInt("Plugin.Debug") >= stage || plugin.getConfig().getInt("plugin.debug") >= stage || plugin.getConfig().getInt("Debug") >= stage || plugin.getConfig().getInt("debug") >= stage) {
T2Csend.info(plugin, "");
Bukkit.getConsoleSender().sendMessage(plugin.getDescription().getPrefix() + " §5DEBUG: §6" + msg);
}
}
public static void debugmsg(Plugin plugin, String msg) {
T2Csend.warning(plugin, "");
Bukkit.getConsoleSender().sendMessage("§e[" + plugin.getDescription().getPrefix() + "] §5DEBUG-MSG: §6" + msg);
}
public static String debugCode(){
return UUID.randomUUID().toString().substring(0,7);
}
}

View File

@ -1,5 +1,6 @@
package net.t2code.t2codelib.SPIGOT.api.messages;
import net.t2code.t2codelib.SPIGOT.api.debug.T2Cdebug;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -61,22 +62,11 @@ public class T2Csend {
public static void debug(Plugin plugin, String msg, Integer stage) {
// if (!new File(Main.getPath(), "config.yml").exists()) return;
if (stage == null) {
if (plugin.getConfig().getBoolean("Plugin.Debug") || plugin.getConfig().getBoolean("plugin.debug") || plugin.getConfig().getBoolean("Debug") || plugin.getConfig().getBoolean("debug")){
info(plugin, "");
Bukkit.getConsoleSender().sendMessage(plugin.getDescription().getPrefix() + " §5DEBUG: §6" + msg);
}
return;
}
if (plugin.getConfig().getInt("Plugin.Debug") >= stage || plugin.getConfig().getInt("plugin.debug") >= stage || plugin.getConfig().getInt("Debug") >= stage || plugin.getConfig().getInt("debug") >= stage) {
info(plugin, "");
Bukkit.getConsoleSender().sendMessage(plugin.getDescription().getPrefix() + " §5DEBUG: §6" + msg);
}
T2Cdebug.debug(plugin, msg, stage);
}
public static void debugmsg(Plugin plugin, String msg) {
warning(plugin, "");
Bukkit.getConsoleSender().sendMessage("§e[" + plugin.getDescription().getPrefix() + "] §5DEBUG-MSG: §6" + msg);
T2Cdebug.debugmsg(plugin, msg);
}
public static void info(Plugin plugin, String msg) {