ModConfig class

Пакет: com.hypixel.hytale.server.core.config

Файл: com/hypixel/hytale/server/core/config/ModConfig.java

Методы (2)

МодификаторыВозвратСигнатура
public void setEnabledvoid setEnabled(@Nonnull Boolean var1)
public void setRequiredVersionvoid setRequiredVersion(@Nonnull SemverRange var1)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.config;

class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.common.semver.SemverRange;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;

class="kw">public class ModConfig {
   @Nonnull
   class="kw">public class="kw">static class="kw">final BuilderCodec<ModConfig> CODEC = BuilderCodec.builder(ModConfig.class, ModConfig::new)
      .append(new KeyedCodec<>("Enabled", Codec.BOOLEAN), (var0, var1) -> var0.enabled = var1, var0 -> var0.enabled)
      .documentation("Determines whether the mod/plugin is enabled.")
      .add()
      .<SemverRange>append(new KeyedCodec<>("RequiredVersion", SemverRange.CODEC), (var0, var1) -> var0.requiredVersion = var1, var0 -> var0.requiredVersion)
      .documentation("The required version range for the mod/plugin.")
      .add()
      .build();
   @Nullable
   class="kw">private Boolean enabled;
   @Nullable
   class="kw">private SemverRange requiredVersion;

   class="kw">public ModConfig() {
   }

   @Nullable
   class="kw">public Boolean getEnabled() {
      class="kw">return this.enabled;
   }

   class="kw">public void setEnabled(@Nonnull Boolean var1) {
      this.enabled = var1;
   }

   @Nullable
   class="kw">public SemverRange getRequiredVersion() {
      class="kw">return this.requiredVersion;
   }

   class="kw">public void setRequiredVersion(@Nonnull SemverRange var1) {
      this.requiredVersion = var1;
   }
}