Class ChannelAudience
java.lang.Object
dev.unnm3d.redischat.api.objects.ChannelAudience
- Direct Known Subclasses:
Channel
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorChannelAudience
(AudienceType type, String name, String... permissions) Constructor without 'local' fieldChannelAudience
(String channelName, String... permissions) Constructor without 'permission' and 'local' fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the audience is a channelboolean
Checks if the audience is a discord channelboolean
isPlayer()
Checks if the audience is a playerboolean
isServer()
Checks if the audience is the serverstatic ChannelAudience
newDiscordAudience
(String authorUsername) Constructor for building a discord audiencestatic ChannelAudience
newPlayerAudience
(String playerName) Constructor for building a player audiencestatic ChannelAudience
publicChannelAudience
(String... permissions) Constructor for building a public channel audience
-
Field Details
-
type
-
name
-
proximityDistance
protected int proximityDistance -
permissions
-
-
Constructor Details
-
ChannelAudience
Constructor without 'local' field- Parameters:
type
- The type of the audience, represented by the AudienceType enumname
- The name of the audiencepermissions
- A varargs parameter representing the permissions of the audience
-
ChannelAudience
Constructor without 'permission' and 'local' fields- Parameters:
channelName
- The name of the channelpermissions
- A varargs parameter representing the permissions of the audience
-
ChannelAudience
public ChannelAudience()Default constructorThis constructor initializes the audience with the SERVER_SENDER name, SYSTEM type, and no permissions.
-
-
Method Details
-
newPlayerAudience
Constructor for building a player audience- Parameters:
playerName
- The name of the player
-
newDiscordAudience
Constructor for building a discord audience- Parameters:
authorUsername
- The discord username of the audience
-
publicChannelAudience
Constructor for building a public channel audience -
isPlayer
public boolean isPlayer()Checks if the audience is a player- Returns:
- True if the audience is a player, false otherwise
-
isServer
public boolean isServer()Checks if the audience is the server- Returns:
- True if the audience is the server, false otherwise
-
isChannel
public boolean isChannel()Checks if the audience is a channel- Returns:
- True if the audience is a channel, false otherwise
-
isDiscord
public boolean isDiscord()Checks if the audience is a discord channel- Returns:
- True if the audience is a discord channel, false otherwise
-
builder
-