// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.common.plugin;

import com.hypixel.hytale.common.util.java.ManifestUtil;
import java.util.Collections;
import java.util.ArrayList;
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import java.util.Map;
import com.hypixel.hytale.common.semver.SemverRange;
import java.util.List;
import javax.annotation.Nullable;
import com.hypixel.hytale.common.semver.Semver;
import com.hypixel.hytale.codec.Codec;
import javax.annotation.Nonnull;
import com.hypixel.hytale.codec.builder.BuilderCodec;

public class PluginManifest
{
    @Nonnull
    private static final BuilderCodec.Builder<PluginManifest> BUILDER;
    @Nonnull
    public static final Codec<PluginManifest> CODEC;
    @Nonnull
    public static final Codec<PluginManifest[]> ARRAY_CODEC;
    private static final String CORE_GROUP = "Hytale";
    private static final Semver CORE_VERSION;
    private String group;
    private String name;
    private Semver version;
    @Nullable
    private String description;
    @Nonnull
    private List<AuthorInfo> authors;
    @Nullable
    private String website;
    @Nullable
    private String main;
    private SemverRange serverVersion;
    @Nonnull
    private Map<PluginIdentifier, SemverRange> dependencies;
    @Nonnull
    private Map<PluginIdentifier, SemverRange> optionalDependencies;
    @Nonnull
    private Map<PluginIdentifier, SemverRange> loadBefore;
    @Nonnull
    private List<PluginManifest> subPlugins;
    private boolean disabledByDefault;
    private boolean includesAssetPack;
    
    public PluginManifest() {
        this.authors = new ObjectArrayList<AuthorInfo>();
        this.dependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.optionalDependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.loadBefore = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.subPlugins = new ArrayList<PluginManifest>();
        this.disabledByDefault = false;
        this.includesAssetPack = false;
    }
    
    public PluginManifest(@Nonnull final String group, @Nonnull final String name, @Nonnull final Semver version, @Nullable final String description, @Nonnull final List<AuthorInfo> authors, @Nullable final String website, @Nullable final String main, @Nullable final SemverRange serverVersion, @Nonnull final Map<PluginIdentifier, SemverRange> dependencies, @Nonnull final Map<PluginIdentifier, SemverRange> optionalDependencies, @Nonnull final Map<PluginIdentifier, SemverRange> loadBefore, @Nonnull final List<PluginManifest> subPlugins, final boolean disabledByDefault) {
        this.authors = new ObjectArrayList<AuthorInfo>();
        this.dependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.optionalDependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.loadBefore = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
        this.subPlugins = new ArrayList<PluginManifest>();
        this.disabledByDefault = false;
        this.includesAssetPack = false;
        this.group = group;
        this.name = name;
        this.version = version;
        this.description = description;
        this.authors = authors;
        this.website = website;
        this.main = main;
        this.serverVersion = serverVersion;
        this.dependencies = dependencies;
        this.optionalDependencies = optionalDependencies;
        this.loadBefore = loadBefore;
        this.subPlugins = subPlugins;
        this.disabledByDefault = disabledByDefault;
    }
    
    public String getGroup() {
        return this.group;
    }
    
    public String getName() {
        return this.name;
    }
    
    public Semver getVersion() {
        return this.version;
    }
    
    @Nullable
    public String getDescription() {
        return this.description;
    }
    
    @Nonnull
    public List<AuthorInfo> getAuthors() {
        return Collections.unmodifiableList((List<? extends AuthorInfo>)this.authors);
    }
    
    @Nullable
    public String getWebsite() {
        return this.website;
    }
    
    public void setGroup(@Nonnull final String group) {
        this.group = group;
    }
    
    public void setName(@Nonnull final String name) {
        this.name = name;
    }
    
    public void setVersion(@Nullable final Semver version) {
        this.version = version;
    }
    
    public void setDescription(@Nullable final String description) {
        this.description = description;
    }
    
    public void setAuthors(@Nonnull final List<AuthorInfo> authors) {
        this.authors = authors;
    }
    
    public void setWebsite(@Nullable final String website) {
        this.website = website;
    }
    
    @Nullable
    public String getMain() {
        return this.main;
    }
    
    public SemverRange getServerVersion() {
        return this.serverVersion;
    }
    
    @Nonnull
    public Map<PluginIdentifier, SemverRange> getDependencies() {
        return Collections.unmodifiableMap((Map<? extends PluginIdentifier, ? extends SemverRange>)this.dependencies);
    }
    
    public void injectDependency(final PluginIdentifier identifier, final SemverRange range) {
        this.dependencies.put(identifier, range);
    }
    
    @Nonnull
    public Map<PluginIdentifier, SemverRange> getOptionalDependencies() {
        return Collections.unmodifiableMap((Map<? extends PluginIdentifier, ? extends SemverRange>)this.optionalDependencies);
    }
    
    @Nonnull
    public Map<PluginIdentifier, SemverRange> getLoadBefore() {
        return Collections.unmodifiableMap((Map<? extends PluginIdentifier, ? extends SemverRange>)this.loadBefore);
    }
    
    public boolean isDisabledByDefault() {
        return this.disabledByDefault;
    }
    
    public boolean includesAssetPack() {
        return this.includesAssetPack;
    }
    
    @Nonnull
    public List<PluginManifest> getSubPlugins() {
        return Collections.unmodifiableList((List<? extends PluginManifest>)this.subPlugins);
    }
    
    public void inherit(@Nonnull final PluginManifest manifest) {
        if (this.group == null) {
            this.group = manifest.group;
        }
        if (this.version == null) {
            this.version = manifest.version;
        }
        if (this.description == null) {
            this.description = manifest.description;
        }
        if (this.authors.isEmpty()) {
            this.authors = manifest.authors;
        }
        if (this.website == null) {
            this.website = manifest.website;
        }
        if (!this.disabledByDefault) {
            this.disabledByDefault = manifest.disabledByDefault;
        }
        this.dependencies.put(new PluginIdentifier(manifest), SemverRange.fromString(manifest.version.toString()));
    }
    
    @Nonnull
    @Override
    public String toString() {
        return "PluginManifest{group='" + this.group + "', name='" + this.name + "', version='" + String.valueOf(this.version) + "', description='" + this.description + "', authors=" + String.valueOf(this.authors) + ", website='" + this.website + "', main='" + this.main + "', serverVersion=" + String.valueOf(this.serverVersion) + ", dependencies=" + String.valueOf(this.dependencies) + ", optionalDependencies=" + String.valueOf(this.optionalDependencies) + ", disabledByDefault=" + this.disabledByDefault;
    }
    
    @Nonnull
    public static CoreBuilder corePlugin(@Nonnull final Class<?> pluginClass) {
        return new CoreBuilder("Hytale", pluginClass.getSimpleName(), PluginManifest.CORE_VERSION, pluginClass.getName());
    }
    
    static {
        // 
        // This method could not be decompiled.
        // 
        // Original Bytecode:
        // 
        //     2: invokedynamic   BootstrapMethod #3, get:()Ljava/util/function/Supplier;
        //     7: invokestatic    com/hypixel/hytale/codec/builder/BuilderCodec.builder:(Ljava/lang/Class;Ljava/util/function/Supplier;)Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //    10: putstatic       com/hypixel/hytale/common/plugin/PluginManifest.BUILDER:Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //    13: getstatic       com/hypixel/hytale/common/plugin/PluginManifest.BUILDER:Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //    16: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //    19: dup            
        //    20: ldc             "Group"
        //    22: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
        //    25: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //    28: invokedynamic   BootstrapMethod #4, accept:()Ljava/util/function/BiConsumer;
        //    33: invokedynamic   BootstrapMethod #5, apply:()Ljava/util/function/Function;
        //    38: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //    41: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //    44: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //    47: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //    50: dup            
        //    51: ldc             "Name"
        //    53: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
        //    56: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //    59: invokedynamic   BootstrapMethod #6, accept:()Ljava/util/function/BiConsumer;
        //    64: invokedynamic   BootstrapMethod #7, apply:()Ljava/util/function/Function;
        //    69: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //    72: invokestatic    com/hypixel/hytale/codec/validation/Validators.nonNull:()Lcom/hypixel/hytale/codec/validation/Validator;
        //    75: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.addValidator:(Lcom/hypixel/hytale/codec/validation/Validator;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //    78: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //    81: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //    84: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //    87: dup            
        //    88: ldc             "Version"
        //    90: getstatic       com/hypixel/hytale/common/semver/Semver.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //    93: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //    96: invokedynamic   BootstrapMethod #8, accept:()Ljava/util/function/BiConsumer;
        //   101: invokedynamic   BootstrapMethod #9, apply:()Ljava/util/function/Function;
        //   106: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   109: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   112: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   115: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   118: dup            
        //   119: ldc             "Description"
        //   121: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
        //   124: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   127: invokedynamic   BootstrapMethod #10, accept:()Ljava/util/function/BiConsumer;
        //   132: invokedynamic   BootstrapMethod #11, apply:()Ljava/util/function/Function;
        //   137: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   140: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   143: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   146: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   149: dup            
        //   150: ldc             "Authors"
        //   152: new             Lcom/hypixel/hytale/codec/codecs/array/ArrayCodec;
        //   155: dup            
        //   156: getstatic       com/hypixel/hytale/common/plugin/AuthorInfo.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   159: invokedynamic   BootstrapMethod #12, apply:()Ljava/util/function/IntFunction;
        //   164: invokespecial   com/hypixel/hytale/codec/codecs/array/ArrayCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/IntFunction;)V
        //   167: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   170: invokedynamic   BootstrapMethod #13, accept:()Ljava/util/function/BiConsumer;
        //   175: invokedynamic   BootstrapMethod #14, apply:()Ljava/util/function/Function;
        //   180: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   183: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   186: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   189: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   192: dup            
        //   193: ldc             "Website"
        //   195: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
        //   198: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   201: invokedynamic   BootstrapMethod #15, accept:()Ljava/util/function/BiConsumer;
        //   206: invokedynamic   BootstrapMethod #16, apply:()Ljava/util/function/Function;
        //   211: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   214: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   217: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   220: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   223: dup            
        //   224: ldc             "Main"
        //   226: getstatic       com/hypixel/hytale/codec/Codec.STRING:Lcom/hypixel/hytale/codec/codecs/simple/StringCodec;
        //   229: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   232: invokedynamic   BootstrapMethod #17, accept:()Ljava/util/function/BiConsumer;
        //   237: invokedynamic   BootstrapMethod #18, apply:()Ljava/util/function/Function;
        //   242: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   245: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   248: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   251: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   254: dup            
        //   255: ldc             "ServerVersion"
        //   257: getstatic       com/hypixel/hytale/common/semver/SemverRange.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   260: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   263: invokedynamic   BootstrapMethod #19, accept:()Ljava/util/function/BiConsumer;
        //   268: invokedynamic   BootstrapMethod #20, apply:()Ljava/util/function/Function;
        //   273: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   276: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   279: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   282: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   285: dup            
        //   286: ldc_w           "Dependencies"
        //   289: new             Lcom/hypixel/hytale/codec/codecs/map/ObjectMapCodec;
        //   292: dup            
        //   293: getstatic       com/hypixel/hytale/common/semver/SemverRange.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   296: invokedynamic   BootstrapMethod #21, get:()Ljava/util/function/Supplier;
        //   301: invokedynamic   BootstrapMethod #22, apply:()Ljava/util/function/Function;
        //   306: invokedynamic   BootstrapMethod #23, apply:()Ljava/util/function/Function;
        //   311: invokespecial   com/hypixel/hytale/codec/codecs/map/ObjectMapCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/Supplier;Ljava/util/function/Function;Ljava/util/function/Function;)V
        //   314: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   317: invokedynamic   BootstrapMethod #24, accept:()Ljava/util/function/BiConsumer;
        //   322: invokedynamic   BootstrapMethod #25, apply:()Ljava/util/function/Function;
        //   327: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   330: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   333: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   336: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   339: dup            
        //   340: ldc_w           "OptionalDependencies"
        //   343: new             Lcom/hypixel/hytale/codec/codecs/map/ObjectMapCodec;
        //   346: dup            
        //   347: getstatic       com/hypixel/hytale/common/semver/SemverRange.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   350: invokedynamic   BootstrapMethod #21, get:()Ljava/util/function/Supplier;
        //   355: invokedynamic   BootstrapMethod #22, apply:()Ljava/util/function/Function;
        //   360: invokedynamic   BootstrapMethod #23, apply:()Ljava/util/function/Function;
        //   365: invokespecial   com/hypixel/hytale/codec/codecs/map/ObjectMapCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/Supplier;Ljava/util/function/Function;Ljava/util/function/Function;)V
        //   368: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   371: invokedynamic   BootstrapMethod #26, accept:()Ljava/util/function/BiConsumer;
        //   376: invokedynamic   BootstrapMethod #27, apply:()Ljava/util/function/Function;
        //   381: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   384: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   387: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   390: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   393: dup            
        //   394: ldc_w           "LoadBefore"
        //   397: new             Lcom/hypixel/hytale/codec/codecs/map/ObjectMapCodec;
        //   400: dup            
        //   401: getstatic       com/hypixel/hytale/common/semver/SemverRange.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   404: invokedynamic   BootstrapMethod #21, get:()Ljava/util/function/Supplier;
        //   409: invokedynamic   BootstrapMethod #22, apply:()Ljava/util/function/Function;
        //   414: invokedynamic   BootstrapMethod #23, apply:()Ljava/util/function/Function;
        //   419: invokespecial   com/hypixel/hytale/codec/codecs/map/ObjectMapCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/Supplier;Ljava/util/function/Function;Ljava/util/function/Function;)V
        //   422: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   425: invokedynamic   BootstrapMethod #28, accept:()Ljava/util/function/BiConsumer;
        //   430: invokedynamic   BootstrapMethod #29, apply:()Ljava/util/function/Function;
        //   435: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   438: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   441: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   444: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   447: dup            
        //   448: ldc_w           "DisabledByDefault"
        //   451: getstatic       com/hypixel/hytale/codec/Codec.BOOLEAN:Lcom/hypixel/hytale/codec/codecs/simple/BooleanCodec;
        //   454: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   457: invokedynamic   BootstrapMethod #30, accept:()Ljava/util/function/BiConsumer;
        //   462: invokedynamic   BootstrapMethod #31, apply:()Ljava/util/function/Function;
        //   467: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   470: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   473: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   476: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   479: dup            
        //   480: ldc_w           "IncludesAssetPack"
        //   483: getstatic       com/hypixel/hytale/codec/Codec.BOOLEAN:Lcom/hypixel/hytale/codec/codecs/simple/BooleanCodec;
        //   486: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   489: invokedynamic   BootstrapMethod #32, accept:()Ljava/util/function/BiConsumer;
        //   494: invokedynamic   BootstrapMethod #33, apply:()Ljava/util/function/Function;
        //   499: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   502: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   505: checkcast       Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   508: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.build:()Lcom/hypixel/hytale/codec/builder/BuilderCodec;
        //   511: putstatic       com/hypixel/hytale/common/plugin/PluginManifest.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   514: getstatic       com/hypixel/hytale/common/plugin/PluginManifest.BUILDER:Lcom/hypixel/hytale/codec/builder/BuilderCodec$Builder;
        //   517: new             Lcom/hypixel/hytale/codec/KeyedCodec;
        //   520: dup            
        //   521: ldc_w           "SubPlugins"
        //   524: new             Lcom/hypixel/hytale/codec/codecs/array/ArrayCodec;
        //   527: dup            
        //   528: getstatic       com/hypixel/hytale/common/plugin/PluginManifest.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   531: invokedynamic   BootstrapMethod #34, apply:()Ljava/util/function/IntFunction;
        //   536: invokespecial   com/hypixel/hytale/codec/codecs/array/ArrayCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/IntFunction;)V
        //   539: invokespecial   com/hypixel/hytale/codec/KeyedCodec.<init>:(Ljava/lang/String;Lcom/hypixel/hytale/codec/Codec;)V
        //   542: invokedynamic   BootstrapMethod #35, accept:()Ljava/util/function/BiConsumer;
        //   547: invokedynamic   BootstrapMethod #36, apply:()Ljava/util/function/Function;
        //   552: invokevirtual   com/hypixel/hytale/codec/builder/BuilderCodec$Builder.append:(Lcom/hypixel/hytale/codec/KeyedCodec;Ljava/util/function/BiConsumer;Ljava/util/function/Function;)Lcom/hypixel/hytale/codec/builder/BuilderField$FieldBuilder;
        //   555: invokevirtual   com/hypixel/hytale/codec/builder/BuilderField$FieldBuilder.add:()Lcom/hypixel/hytale/codec/builder/BuilderCodec$BuilderBase;
        //   558: pop            
        //   559: new             Lcom/hypixel/hytale/codec/codecs/array/ArrayCodec;
        //   562: dup            
        //   563: getstatic       com/hypixel/hytale/common/plugin/PluginManifest.CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   566: invokedynamic   BootstrapMethod #37, apply:()Ljava/util/function/IntFunction;
        //   571: invokespecial   com/hypixel/hytale/codec/codecs/array/ArrayCodec.<init>:(Lcom/hypixel/hytale/codec/Codec;Ljava/util/function/IntFunction;)V
        //   574: putstatic       com/hypixel/hytale/common/plugin/PluginManifest.ARRAY_CODEC:Lcom/hypixel/hytale/codec/Codec;
        //   577: invokestatic    com/hypixel/hytale/common/util/java/ManifestUtil.getVersion:()Lcom/hypixel/hytale/common/semver/Semver;
        //   580: ifnonnull       592
        //   583: ldc_w           "0.0.0-dev"
        //   586: invokestatic    com/hypixel/hytale/common/semver/Semver.fromString:(Ljava/lang/String;)Lcom/hypixel/hytale/common/semver/Semver;
        //   589: goto            595
        //   592: invokestatic    com/hypixel/hytale/common/util/java/ManifestUtil.getVersion:()Lcom/hypixel/hytale/common/semver/Semver;
        //   595: putstatic       com/hypixel/hytale/common/plugin/PluginManifest.CORE_VERSION:Lcom/hypixel/hytale/common/semver/Semver;
        //   598: return         
        //    StackMapTable: 00 02 FB 02 50 42 07 00 5E
        // 
        // The error that occurred was:
        // 
        // java.lang.UnsupportedOperationException: The requested operation is not supported.
        //     at com.strobel.util.ContractUtils.unsupported(ContractUtils.java:27)
        //     at com.strobel.assembler.metadata.TypeReference.getRawType(TypeReference.java:284)
        //     at com.strobel.assembler.metadata.TypeReference.getRawType(TypeReference.java:279)
        //     at com.strobel.assembler.metadata.TypeReference.makeGenericType(TypeReference.java:154)
        //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitClassType(TypeSubstitutionVisitor.java:267)
        //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitClassType(TypeSubstitutionVisitor.java:25)
        //     at com.strobel.assembler.metadata.TypeDefinition.accept(TypeDefinition.java:189)
        //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visit(TypeSubstitutionVisitor.java:40)
        //     at com.strobel.assembler.metadata.TypeSubstitutionVisitor.visitMethod(TypeSubstitutionVisitor.java:324)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2586)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:790)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2689)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1510)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2483)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1040)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:782)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)
        //     at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1083)
        //     at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:815)
        //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:684)
        //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:667)
        //     at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:373)
        //     at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:95)
        //     at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:344)
        //     at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)
        //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)
        //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:93)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:868)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:761)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:638)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:605)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:195)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:162)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:137)
        //     at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
        //     at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
        //     at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)
        //     at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)
        //     at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:129)
        // 
        throw new IllegalStateException("An error occurred while decompiling this method.");
    }
    
    public static class CoreBuilder
    {
        private static final String CORE_GROUP = "Hytale";
        private static final Semver CORE_VERSION;
        @Nonnull
        private final String group;
        @Nonnull
        private final String name;
        @Nonnull
        private final Semver version;
        @Nullable
        private String description;
        @Nonnull
        private final String main;
        @Nonnull
        private final Map<PluginIdentifier, SemverRange> dependencies;
        @Nonnull
        private final Map<PluginIdentifier, SemverRange> optionalDependencies;
        @Nonnull
        private final Map<PluginIdentifier, SemverRange> loadBefore;
        
        @Nonnull
        public static CoreBuilder corePlugin(@Nonnull final Class<?> pluginClass) {
            return new CoreBuilder("Hytale", pluginClass.getSimpleName(), CoreBuilder.CORE_VERSION, pluginClass.getName());
        }
        
        private CoreBuilder(@Nonnull final String group, @Nonnull final String name, @Nonnull final Semver version, @Nonnull final String main) {
            this.dependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
            this.optionalDependencies = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
            this.loadBefore = new Object2ObjectLinkedOpenHashMap<PluginIdentifier, SemverRange>();
            this.group = group;
            this.name = name;
            this.version = version;
            this.main = main;
        }
        
        @Nonnull
        public CoreBuilder description(@Nonnull final String description) {
            this.description = description;
            return this;
        }
        
        @Nonnull
        @SafeVarargs
        public final CoreBuilder depends(@Nonnull final Class<?>... dependencies) {
            for (final Class<?> dependency : dependencies) {
                this.dependencies.put(new PluginIdentifier("Hytale", dependency.getSimpleName()), SemverRange.WILDCARD);
            }
            return this;
        }
        
        @Nonnull
        @SafeVarargs
        public final CoreBuilder optDepends(@Nonnull final Class<?>... dependencies) {
            for (final Class<?> optionalDependency : dependencies) {
                this.optionalDependencies.put(new PluginIdentifier("Hytale", optionalDependency.getSimpleName()), SemverRange.WILDCARD);
            }
            return this;
        }
        
        @Nonnull
        @SafeVarargs
        public final CoreBuilder loadsBefore(@Nonnull final Class<?>... plugins) {
            for (final Class<?> plugin : plugins) {
                this.loadBefore.put(new PluginIdentifier("Hytale", plugin.getSimpleName()), SemverRange.WILDCARD);
            }
            return this;
        }
        
        @Nonnull
        public PluginManifest build() {
            return new PluginManifest(this.group, this.name, this.version, this.description, Collections.emptyList(), null, this.main, null, this.dependencies, this.optionalDependencies, this.loadBefore, Collections.emptyList(), false);
        }
        
        static {
            CORE_VERSION = ((ManifestUtil.getVersion() == null) ? Semver.fromString("0.0.0-dev") : ManifestUtil.getVersion());
        }
    }
}
