Package com.soulfiremc.server.command
Record Class CommandSourceStack
java.lang.Object
java.lang.Record
com.soulfiremc.server.command.CommandSourceStack
public record CommandSourceStack(SoulFireServer soulFire, SoulFireUser source, @Nullable Set<UUID> instanceIds, @Nullable Set<UUID> botIds)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandSourceStack
(SoulFireServer soulFire, SoulFireUser source, @Nullable Set<UUID> instanceIds, @Nullable Set<UUID> botIds) Creates an instance of aCommandSourceStack
record class. -
Method Summary
Modifier and TypeMethodDescriptionbotIds()
Returns the value of thebotIds
record component.final boolean
Indicates whether some other object is "equal to" this one.getInstanceVisibleBots
(InstanceManager instance) final int
hashCode()
Returns a hash code value for this object.Returns the value of theinstanceIds
record component.static CommandSourceStack
ofInstance
(SoulFireServer soulFire, SoulFireUser source, Set<UUID> instanceIds) static CommandSourceStack
ofUnrestricted
(SoulFireServer soulFire, SoulFireUser source) soulFire()
Returns the value of thesoulFire
record component.source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.withBotIds
(Set<UUID> botIds) withInstanceIds
(Set<UUID> instanceIds)
-
Field Details
-
IS_ADMIN
-
-
Constructor Details
-
CommandSourceStack
public CommandSourceStack(SoulFireServer soulFire, SoulFireUser source, @Nullable Set<UUID> instanceIds, @Nullable Set<UUID> botIds) Creates an instance of aCommandSourceStack
record class.- Parameters:
soulFire
- the value for thesoulFire
record componentsource
- the value for thesource
record componentinstanceIds
- the value for theinstanceIds
record componentbotIds
- the value for thebotIds
record component
-
-
Method Details
-
ofUnrestricted
-
ofInstance
public static CommandSourceStack ofInstance(SoulFireServer soulFire, SoulFireUser source, Set<UUID> instanceIds) -
withInstanceIds
-
withBotIds
-
getVisibleInstances
-
getInstanceVisibleBots
-
getGlobalVisibleBots
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
soulFire
Returns the value of thesoulFire
record component.- Returns:
- the value of the
soulFire
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
instanceIds
Returns the value of theinstanceIds
record component.- Returns:
- the value of the
instanceIds
record component
-
botIds
Returns the value of thebotIds
record component.- Returns:
- the value of the
botIds
record component
-