Record Class GameSettings
java.lang.Object
java.lang.Record
fr.multimc.api.spigot.games.settings.GameSettings
-
Constructor Summary
ConstructorsConstructorDescriptionGameSettings(@NotNull Schematic gameSchematic, @NotNull GameType gameType, @Nullable Class<? extends IScoreBoard> scoreboard, @NotNull List<RelativeLocation> spawnPoints, @Nullable List<MmcEntity> entities, @Nullable HashMap<String, Object> customSettings, int duration, int minPlayers, int tickDelay) Constructor of InstanceSettings -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomSettingsrecord component.intduration()Returns the value of thedurationrecord component.entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegameSchematicrecord component.gameType()Returns the value of thegameTyperecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theminPlayersrecord component.Class<? extends IScoreBoard>Returns the value of thescoreboardrecord component.Returns the value of thespawnPointsrecord component.intReturns the value of thetickDelayrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GameSettings
public GameSettings(@NotNull @NotNull Schematic gameSchematic, @NotNull @NotNull GameType gameType, @Nullable @Nullable Class<? extends IScoreBoard> scoreboard, @NotNull @NotNull List<RelativeLocation> spawnPoints, @Nullable @Nullable List<MmcEntity> entities, @Nullable @Nullable HashMap<String, Object> customSettings, int duration, int minPlayers, int tickDelay) Constructor of InstanceSettings- Parameters:
gameSchematic- File for the game gameSchematicgameType- GameType of the gameduration- Duration of the gamespawnPoints- List of spawn pointsentities- List of entities to spawncustomSettings- Custom gameSettingstickDelay- Delay in game tick between two calls of Instance's tick method
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
gameSchematic
Returns the value of thegameSchematicrecord component.- Returns:
- the value of the
gameSchematicrecord component
-
gameType
Returns the value of thegameTyperecord component.- Returns:
- the value of the
gameTyperecord component
-
scoreboard
Returns the value of thescoreboardrecord component.- Returns:
- the value of the
scoreboardrecord component
-
spawnPoints
Returns the value of thespawnPointsrecord component.- Returns:
- the value of the
spawnPointsrecord component
-
entities
Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-
customSettings
Returns the value of thecustomSettingsrecord component.- Returns:
- the value of the
customSettingsrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
minPlayers
public int minPlayers()Returns the value of theminPlayersrecord component.- Returns:
- the value of the
minPlayersrecord component
-
tickDelay
public int tickDelay()Returns the value of thetickDelayrecord component.- Returns:
- the value of the
tickDelayrecord component
-