(Temporarily) Include datapacks in debugpaste

This commit is contained in:
NotMyFault 2021-07-26 20:40:18 +02:00
parent b4f9ade5bd
commit e1d18dc896
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -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();
} }