(Temporarily) Include datapacks in debugpaste

Dieser Commit ist enthalten in:
NotMyFault 2021-07-26 20:40:18 +02:00
Ursprung b4f9ade5bd
Commit e1d18dc896
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C

Datei anzeigen

@ -30,6 +30,7 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.bukkit.BukkitPlayer; import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.internal.util.LogManagerCompat; import com.sk89q.worldedit.internal.util.LogManagerCompat;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import io.papermc.paper.datapack.Datapack;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -159,6 +160,13 @@ public class FaweBukkit implements IFawe, Listener {
.append(" • Soft Dependencies: ").append(p.getDescription().getSoftDepend()).append("\n") .append(" • Soft Dependencies: ").append(p.getDescription().getSoftDepend()).append("\n")
.append(" • Provides: ").append(p.getDescription().getProvides()).append("\n"); .append(" • Provides: ").append(p.getDescription().getProvides()).append("\n");
} }
if (PaperLib.isPaper()) {
Collection<Datapack> datapacks = Bukkit.getServer().getDatapackManager().getEnabledPacks();
msg.append("Enabled Datapacks (").append(datapacks.size()).append("):\n");
for (Datapack dp : datapacks) {
msg.append(" - ").append(dp.getName()).append("\n");
}
}
return msg.toString(); return msg.toString();
} }