Record Class PlayerEvents.SettingChanged
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.player.PlayerEvents.SettingChanged
- Enclosing class:
PlayerEvents
public static record PlayerEvents.SettingChanged(@NotNull MachinePlayer player, @NotNull PlayerSetting<?> setting, @NotNull Object oldValue, @NotNull Object newValue)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSettingChanged(@NotNull MachinePlayer player, @NotNull PlayerSetting<?> setting, @NotNull Object oldValue, @NotNull Object newValue) Creates an instance of aSettingChangedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull ObjectnewValue()Returns the value of thenewValuerecord component.@NotNull ObjectoldValue()Returns the value of theoldValuerecord component.@NotNull MachinePlayerplayer()Returns the value of theplayerrecord component.@NotNull PlayerSetting<?> setting()Returns the value of thesettingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SettingChanged
public SettingChanged(@NotNull @NotNull MachinePlayer player, @NotNull @NotNull PlayerSetting<?> setting, @NotNull @NotNull Object oldValue, @NotNull @NotNull Object newValue) Creates an instance of aSettingChangedrecord class.- Parameters:
player- the value for theplayerrecord componentsetting- the value for thesettingrecord componentoldValue- the value for theoldValuerecord componentnewValue- the value for thenewValuerecord component
-
-
Method Details
-
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). -
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
setting
Returns the value of thesettingrecord component.- Returns:
- the value of the
settingrecord component
-
oldValue
Returns the value of theoldValuerecord component.- Returns:
- the value of the
oldValuerecord component
-
newValue
Returns the value of thenewValuerecord component.- Returns:
- the value of the
newValuerecord component
-