You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.enableLatestLogSpigot() // Adds the paper last log
53
+
.defaultPaperDebugInformation() // Adds as a parseable yaml format some system relevant information from bukkit
54
+
// Adds a file from path wrapped in a placeholder object
55
+
.addFile(DebugFile(attollo.dataFolder.toPath().resolve("config.yml"),FileType.YAML,"Config as file object"))
56
+
// Adds a file from path
57
+
.addFile(attollo.dataFolder.toPath().resolve("config.yml"),FileType.YAML,"Config as file")
58
+
// Add yaml formatted string to the debug
59
+
.addYAML(attollo.config.saveToString(), "Config")
60
+
// Add a simple text to the debug
61
+
.addText("Text test", "Text test")
62
+
// Add json formatted string to the debug
63
+
.addJson(Gson().toJson(obj), "Json test")
64
+
// Upload to a bytebin server
65
+
.upload()
66
+
// Encodes the URL as string
67
+
val encodedUrl =URLEncoder.encode(
68
+
result.uploadServer,
69
+
StandardCharsets.UTF_8
70
+
)
71
+
// ByteBin Code from Server
72
+
val code = result.code
73
+
// Prettified url
74
+
val openUrl ="https://debugpaste.onelitefeather.net/#/$code/$encodedUrl/"
75
+
val component =MiniMessage.miniMessage().deserialize("<#05b9ff>[Attollo] <yellow><click:OPEN_URL:'$openUrl'>Click <u>here</u> to open the debug paste</click>")
76
+
```
77
+
**For better formatting we used mini message also the two lines `enableLatestLogSpigot()` and `defaultPaperDebugInformation()` requires the Bukkit Extension.**
78
+
79
+
Example for java
80
+
```java
81
+
var obj =newJsonObject();
82
+
obj.addProperty("Test", "Test");
83
+
84
+
var builder =DebugBuilder.builder(BYTEBIN_BASE_URL);
85
+
builder = enableLatestLogSpigot(builder);
86
+
builder = defaultPaperDebugInformation(builder);
87
+
builder.addFile(newDebugFile(Path.of(""), FileType.YAML, "Config as file object"))
88
+
.addFile(Path.of(""), FileType.YAML, "Config as file");
0 commit comments