mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Fix debugpaste split
This commit is contained in:
parent
bf02c9fe5f
commit
a65d546f3b
@ -92,10 +92,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass;
|
||||
@ -818,11 +820,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
||||
return new BukkitPlotGenerator(generator);
|
||||
}
|
||||
|
||||
@Override public List<String> getPluginIds() {
|
||||
final List<String> names = new ArrayList<>();
|
||||
@Override public List<Map.Entry<Map.Entry<String, String>, Boolean>> getPluginIds() {
|
||||
List<Map.Entry<Map.Entry<String, String>, Boolean>> names = new ArrayList<>();
|
||||
for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
names.add(plugin.getName() + ';' + plugin.getDescription().getVersion() + ':' + plugin
|
||||
.isEnabled());
|
||||
Map.Entry<String, String> id = new AbstractMap.SimpleEntry<>(plugin.getName(), plugin.getDescription().getVersion());
|
||||
names.add(new AbstractMap.SimpleEntry<>(id, plugin.isEnabled()));
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IPlotMain extends ILogger {
|
||||
|
||||
@ -244,7 +245,7 @@ public interface IPlotMain extends ILogger {
|
||||
*/
|
||||
@NotNull IndependentPlotGenerator getDefaultGenerator();
|
||||
|
||||
List<String> getPluginIds();
|
||||
List<Map.Entry<Map.Entry<String, String>, Boolean>> getPluginIds();
|
||||
|
||||
Actor getConsole();
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste",
|
||||
@ -54,7 +55,7 @@ public class DebugPaste extends SubCommand {
|
||||
b.append("online_mode: ").append(UUIDHandler.getUUIDWrapper()).append(';')
|
||||
.append(!Settings.UUID.OFFLINE).append('\n');
|
||||
b.append("Plugins:");
|
||||
for (String id : PlotSquared.get().IMP.getPluginIds()) {
|
||||
for (Map.Entry<Map.Entry<String, String>, Boolean> pluginInfo : PlotSquared.get().IMP.getPluginIds()) {
|
||||
String[] split = id.split(":");
|
||||
String[] split2 = split[0].split(";");
|
||||
String enabled = split.length == 2 ? split[1] : "unknown";
|
||||
|
Loading…
Reference in New Issue
Block a user