From 5f74e88fa21bf8633dc12f2047f8e0dcae7714bb Mon Sep 17 00:00:00 2001 From: Bixilon Date: Thu, 2 Dec 2021 10:36:05 +0100 Subject: [PATCH] profiles: add java doc for all options --- .../config/profile/profiles/eros/ErosProfile.kt | 3 +++ .../profile/profiles/eros/general/GeneralC.kt | 2 +- .../profile/profiles/eros/server/list/ListC.kt | 11 +++++++++++ .../profiles/eros/server/modify/ModifyC.kt | 10 ++++++++++ .../profile/profiles/particle/ParticleProfile.kt | 15 ++++++++++++++- 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/ErosProfile.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/ErosProfile.kt index 1278f4075..14a507a08 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/ErosProfile.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/ErosProfile.kt @@ -6,6 +6,9 @@ import de.bixilon.minosoft.config.profile.profiles.eros.ErosProfileManager.lates import de.bixilon.minosoft.config.profile.profiles.eros.general.GeneralC import de.bixilon.minosoft.config.profile.profiles.eros.server.ServerC +/** + * Profile for Eros + */ class ErosProfile( description: String? = null, ) : Profile { diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/general/GeneralC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/general/GeneralC.kt index 029423829..377d73a15 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/general/GeneralC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/general/GeneralC.kt @@ -5,7 +5,7 @@ import java.util.* class GeneralC { /** - * Language to use for eros (and the fallback for the connection) + * Language to use for eros. This is also the fallback language for other profiles */ var language: Locale by delegate(Locale.getDefault()) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/list/ListC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/list/ListC.kt index 7a545656b..759b0f6c0 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/list/ListC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/list/ListC.kt @@ -3,7 +3,18 @@ package de.bixilon.minosoft.config.profile.profiles.eros.server.list import de.bixilon.minosoft.config.profile.profiles.eros.ErosProfileManager.delegate class ListC { + /** + * Hides all servers in the server list that can not be pinged + */ var hideOffline by delegate(false) + + /** + * Hides all servers in the server list, when the amount of online players exceeds the slots + */ var hideFull by delegate(false) + + /** + * Hides all servers in the server list when <= 0 players are online + */ var hideEmpty by delegate(false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/modify/ModifyC.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/modify/ModifyC.kt index 7b85faf1b..06ed3fced 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/modify/ModifyC.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/eros/server/modify/ModifyC.kt @@ -2,7 +2,17 @@ package de.bixilon.minosoft.config.profile.profiles.eros.server.modify import de.bixilon.minosoft.config.profile.profiles.eros.ErosProfileManager.delegate +/** + * Configuration for the add or edit server dialog + */ class ModifyC { + /** + * Shows releases in the version select dropdown + */ var showReleases by delegate(true) + + /** + * Shows snapshots in the version select dropdown + */ var showSnapshots by delegate(false) } diff --git a/src/main/java/de/bixilon/minosoft/config/profile/profiles/particle/ParticleProfile.kt b/src/main/java/de/bixilon/minosoft/config/profile/profiles/particle/ParticleProfile.kt index 58c28cbe8..762d10ad6 100644 --- a/src/main/java/de/bixilon/minosoft/config/profile/profiles/particle/ParticleProfile.kt +++ b/src/main/java/de/bixilon/minosoft/config/profile/profiles/particle/ParticleProfile.kt @@ -5,6 +5,9 @@ import de.bixilon.minosoft.config.profile.profiles.particle.ParticleProfileManag import de.bixilon.minosoft.config.profile.profiles.particle.ParticleProfileManager.latestVersion import de.bixilon.minosoft.gui.rendering.RenderConstants +/** + * Profile for particle + */ class ParticleProfile( description: String? = null, ) : Profile { @@ -14,8 +17,18 @@ class ParticleProfile( override val version: Int = latestVersion override val description by delegate(description ?: "") - + /** + * Enabled or disables particle renderer + * Does not skip loading of particles + */ var enabled by delegate(true) + + /** + * Limits the number of particles. + * Particles that exceed that count will be ignored + * Must not be negative or exceed $RenderConstants.MAXIMUM_PARTICLE_AMOUNT + * @see RenderConstants.MAXIMUM_PARTICLE_AMOUNT + */ var maxAmount by delegate(RenderConstants.MAXIMUM_PARTICLE_AMOUNT) { check(it in 0..RenderConstants.MAXIMUM_PARTICLE_AMOUNT) { "Particle amount must be non-negative and may not exceed ${RenderConstants.MAXIMUM_PARTICLE_AMOUNT}" } }