Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Add the configuration to the dump command, also add a toString method to the ProtocolVersion class.
Dieser Commit ist enthalten in:
Ursprung
0f96c24c78
Commit
a0ad97947d
@ -91,4 +91,9 @@ public class ProtocolVersion {
|
||||
public int hashCode() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s(%d)", this.getName(), this.getId());
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class DumpSubCmd extends ViaSubCommand {
|
||||
@ -52,7 +53,9 @@ public class DumpSubCmd extends ViaSubCommand {
|
||||
for (Plugin p : Bukkit.getPluginManager().getPlugins())
|
||||
plugins.add(new PluginInfo(p.isEnabled(), p.getDescription().getName(), p.getDescription().getVersion(), p.getDescription().getMain(), p.getDescription().getAuthors()));
|
||||
|
||||
final DumpTemplate template = new DumpTemplate(version, plugins);
|
||||
Map<String, Object> configuration = ((ViaVersionPlugin) ViaVersion.getInstance()).getConfig().getValues(false);
|
||||
|
||||
final DumpTemplate template = new DumpTemplate(version, configuration, plugins);
|
||||
|
||||
Bukkit.getScheduler().runTaskAsynchronously((ViaVersionPlugin) ViaVersion.getInstance(), new Runnable() {
|
||||
@Override
|
||||
|
@ -4,10 +4,12 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class DumpTemplate {
|
||||
private VersionInfo versions;
|
||||
private VersionInfo versionInfo;
|
||||
private Map<String, Object> configuration;
|
||||
private List<PluginInfo> plugins;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren