Record Class InstanceSettingsImpl
java.lang.Object
java.lang.Record
com.soulfiremc.server.settings.lib.InstanceSettingsImpl
- All Implemented Interfaces:
InstanceSettingsSource, SettingsSource<SettingsSource.Instance>
public record InstanceSettingsImpl(InstanceSettingsImpl.Stem stem, Map<UUID, MinecraftAccount> mappedAccounts, ServerSettingsSource serverSettings)
extends Record
implements InstanceSettingsSource
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface SettingsSource
SettingsSource.Bot, SettingsSource.CustomIntSupplier, SettingsSource.Instance, SettingsSource.Server, SettingsSource.SourceType -
Constructor Summary
ConstructorsConstructorDescriptionInstanceSettingsImpl(InstanceSettingsImpl.Stem stem, ServerSettingsSource serverSettings) InstanceSettingsImpl(InstanceSettingsImpl.Stem stem, Map<UUID, MinecraftAccount> mappedAccounts, ServerSettingsSource serverSettings) Creates an instance of aInstanceSettingsImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccounts()final booleanIndicates whether some other object is "equal to" this one.Optional<com.google.gson.JsonElement> get(Property<SettingsSource.Instance> property) final inthashCode()Returns a hash code value for this object.Returns the value of themappedAccountsrecord component.proxies()Returns the value of theserverSettingsrecord component.stem()Returns the value of thestemrecord component.final StringtoString()Returns a string representation of this record class.@NotNull InstanceSettingsImplwithMappedAccounts(Map<UUID, MinecraftAccount> mappedAccounts) @NotNull InstanceSettingsImplwithServerSettings(ServerSettingsSource serverSettings) @NotNull InstanceSettingsImpl
-
Constructor Details
-
InstanceSettingsImpl
-
InstanceSettingsImpl
public InstanceSettingsImpl(InstanceSettingsImpl.Stem stem, Map<UUID, MinecraftAccount> mappedAccounts, ServerSettingsSource serverSettings) Creates an instance of aInstanceSettingsImplrecord class.- Parameters:
stem- the value for thestemrecord componentmappedAccounts- the value for themappedAccountsrecord componentserverSettings- the value for theserverSettingsrecord component
-
-
Method Details
-
get
- Specified by:
getin interfaceSettingsSource<SettingsSource.Instance>
-
accounts
- Specified by:
accountsin interfaceInstanceSettingsSource
-
proxies
- Specified by:
proxiesin interfaceInstanceSettingsSource
-
withStem
- Returns:
this.
-
withMappedAccounts
@NotNull public @NotNull InstanceSettingsImpl withMappedAccounts(Map<UUID, MinecraftAccount> mappedAccounts) - Returns:
this.
-
withServerSettings
@NotNull public @NotNull InstanceSettingsImpl withServerSettings(ServerSettingsSource serverSettings) - Returns:
this.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
stem
Returns the value of thestemrecord component.- Specified by:
stemin interfaceInstanceSettingsSource- Specified by:
stemin interfaceSettingsSource<SettingsSource.Instance>- Returns:
- the value of the
stemrecord component
-
mappedAccounts
Returns the value of themappedAccountsrecord component.- Returns:
- the value of the
mappedAccountsrecord component
-
serverSettings
Returns the value of theserverSettingsrecord component.- Specified by:
serverSettingsin interfaceInstanceSettingsSource- Returns:
- the value of the
serverSettingsrecord component
-