1.6.2 release
This commit is contained in:
1 parent
4a5ebb7f4f
commit
fa765f7162
5 files changed
+21
-17
No files matched your search
@@ -1,3 +1,6 @@
|
||||
**1.6.2:**
|
||||
- Fix console logging API.
|
||||
|
||||
**1.6.1**
|
||||
- Log API MiniPlaceholder creation to the console.
|
||||
- trueogColorize API.
|
||||
|
||||
@@ -248,18 +248,18 @@ Java:
|
||||
String unformatted = UtilitiesOG.stripFormatting(content);
|
||||
```
|
||||
|
||||
**[void] logToConsole(Plugin plugin, String message)**
|
||||
**[void] logToConsole(String prefix, String message)**
|
||||
|
||||
Logs a message to the server console with the prefix of the calling plugin. The message will have color codes and formatting stripped.
|
||||
Logs a message to the server console with a prefix. The message and prefix will have modern and legacy color codes and formatting stripped.
|
||||
|
||||
Kotlin:
|
||||
```kotlin
|
||||
UtilitiesOG.logToConsole(plugin, "&6This is a &*message with <green>color codes!")
|
||||
UtilitiesOG.logToConsole("[MyPlugin-OG]", "&6This is a &*message with <green>color codes!")
|
||||
```
|
||||
|
||||
Java:
|
||||
```java
|
||||
UtilitiesOG.logToConsole(plugin, "&6This is a &*message with <green>color codes!");
|
||||
UtilitiesOG.logToConsole("[MyPlugin-OG]", "&6This is a &*message with <green>color codes!");
|
||||
```
|
||||
|
||||
**[BukkitTask] runTaskAsynchronously(final Runnable run)**
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ java {
|
||||
}
|
||||
|
||||
group = "net.trueog.utilities-og" // Declare bundle identifier.
|
||||
version = "1.6" // Declare plugin version (will be in .jar).
|
||||
version = "1.6.2" // Declare plugin version (will be in .jar).
|
||||
|
||||
val apiVersion = "1.19" // Declare minecraft server target version.
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
@@ -272,7 +271,7 @@ public final class UtilitiesOG extends JavaPlugin {
|
||||
}
|
||||
else {
|
||||
|
||||
logToConsole(getPlugin(), "Player with UUID " + playerUUID + " is not online.");
|
||||
logToConsole("[Utilities-OG]", "Player with UUID " + playerUUID + " is not online.");
|
||||
|
||||
}
|
||||
|
||||
@@ -320,7 +319,7 @@ public final class UtilitiesOG extends JavaPlugin {
|
||||
}
|
||||
else {
|
||||
|
||||
logToConsole(getPlugin(), "Player with UUID " + playerUUID + " is not online.");
|
||||
logToConsole("[Utilities-OG]", "Player with UUID " + playerUUID + " is not online.");
|
||||
|
||||
return TextUtils.expandTextWithPlaceholders(message);
|
||||
|
||||
@@ -402,9 +401,9 @@ public final class UtilitiesOG extends JavaPlugin {
|
||||
}
|
||||
|
||||
// Console logging API that automatically strips legacy and modern formatting.
|
||||
public static void logToConsole(Plugin plugin, String message) {
|
||||
public static void logToConsole(String prefix, String message) {
|
||||
|
||||
Bukkit.getLogger().info("[" + plugin.getName() + "] " + TextUtils.stripColors(message));
|
||||
Bukkit.getLogger().info(TextUtils.stripColors(prefix + message));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,11 @@ import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.trueog.utilitiesog.UtilitiesOG;
|
||||
|
||||
public class PlaceholderUtils {
|
||||
|
||||
|
||||
// TODO: Document new MiniPlaceholder registration API with arguments.
|
||||
|
||||
private static String prefixConsole = "[Utilities-OG]";
|
||||
|
||||
// Map to store Expansion Data per prefix.
|
||||
private static final Map<String, ExpansionData> expansionDataMap = new HashMap<>();
|
||||
|
||||
@@ -50,7 +52,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log global placeholder registration without arguments.
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Global MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Global MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
|
||||
return this;
|
||||
|
||||
@@ -77,7 +79,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log global placeholder registration with arguments.
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Global MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Global MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
|
||||
return this;
|
||||
|
||||
@@ -101,7 +103,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log audience placeholder registration without arguments.
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Audience MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Audience MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
|
||||
return this;
|
||||
|
||||
@@ -134,7 +136,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log audience placeholder registration with arguments.
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Audience MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Audience MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
|
||||
return this;
|
||||
|
||||
@@ -160,7 +162,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log relational placeholder registration without arguments
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Relational MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Relational MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " without arguments");
|
||||
|
||||
return this;
|
||||
|
||||
@@ -193,7 +195,7 @@ public class PlaceholderUtils {
|
||||
});
|
||||
|
||||
// Log relational placeholder registration with arguments.
|
||||
UtilitiesOG.logToConsole(UtilitiesOG.getPlugin(), "Registered Relational MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
UtilitiesOG.logToConsole(prefixConsole, "Registered Relational MiniPlaceholder: " + miniPlaceholderPrefix + "_" + miniPlaceholderSuffix + " with arguments");
|
||||
|
||||
return this;
|
||||
|
||||
|
||||
Reference in new issue
Block a user