Add server brand to debugpaste (#4640)

Signed-off-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
Alexander Brandes 2025-05-17 23:18:52 +02:00 committed by GitHub
parent 058983cdd5
commit b84599b4b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View File

@ -252,6 +252,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
return Bukkit.getVersion();
}
@Override
public @NonNull String serverBrand() {
return Bukkit.getName();
}
@Override
@SuppressWarnings("deprecation") // Paper deprecation
public void onEnable() {

View File

@ -120,6 +120,14 @@ public interface PlotPlatform<P> extends LocaleHolder {
*/
@NonNull String serverImplementation();
/**
* Gets the server brand name
*
* @return server brand
* @since TODO
*/
@NonNull String serverBrand();
/**
* Gets the native server code package prefix.
*

View File

@ -86,7 +86,8 @@ public class DebugPaste extends SubCommand {
b.append("# WorldEdit implementation:\n");
b.append(PlotSquared.platform().worldEditImplementations()).append("\n\n");
b.append("# Server Information\n");
b.append("Server Version: ").append(PlotSquared.platform().serverImplementation())
b.append("Server Version: ").append(PlotSquared.platform().serverBrand()).append(": ")
.append(PlotSquared.platform().serverImplementation()).append("\n")
.append("\n");
b.append("online_mode: ").append(!Settings.UUID.OFFLINE).append(';')
.append(!Settings.UUID.OFFLINE).append('\n');