Merge branch 'master' of https://github.com/Matsv/ViaVersion into upmaster

This commit is contained in:
Matsv 2016-08-22 21:38:19 +02:00
commit f8a73d5fc2
3 changed files with 12 additions and 2 deletions

View File

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

View File

@ -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

View File

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