Index
All Classes and Interfaces|All Packages
A
- AbilityUseEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a player uses a special ability.
- AbilityUseEvent(String, Player, AbilityUseEvent.AbilityType, Player) - Constructor for class com.ohacd.matchbox.api.events.AbilityUseEvent
-
Creates a new ability use event.
- AbilityUseEvent.AbilityType - Enum Class in com.ohacd.matchbox.api.events
-
Types of abilities that can be used.
- addEventListener(MatchboxEventListener) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Adds an event listener to receive game events.
- addPlayer(Player) - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Adds a player to this session.
- allow(ChatMessage) - Static method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Creates an ALLOW result with the original message.
- ALLOW - Enum constant in enum class com.ohacd.matchbox.api.ChatResult
-
Allow the message to proceed through the normal routing.
- allowModified(ChatMessage) - Static method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Creates an ALLOW result with a modified message.
- ApiGameSession - Class in com.ohacd.matchbox.api
-
API wrapper for GameSession that provides a clean interface for external integration.
- ApiGameSession(GameSession) - Constructor for class com.ohacd.matchbox.api.ApiGameSession
-
Creates a new API game session wrapper.
- ApiValidationHelper - Class in com.ohacd.matchbox.api
-
Utility class for validating common API inputs and providing helpful error messages.
- ApiValidationHelper.ValidationResult - Class in com.ohacd.matchbox.api
-
Simple result class for validation operations.
B
- build() - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Builds the GameConfig instance.
- Builder() - Constructor for class com.ohacd.matchbox.api.GameConfig.Builder
-
Creates a new builder with default values.
C
- cancel(ChatMessage) - Static method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Creates a CANCEL result.
- CANCEL - Enum constant in enum class com.ohacd.matchbox.api.ChatResult
-
Cancel the message entirely - prevents any further processing.
- canTransitionTo(GamePhase) - Method in class com.ohacd.matchbox.api.PhaseController
-
Checks if transitioning to a specific phase is valid.
- channel() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
channelrecord component. - ChatChannel - Enum Class in com.ohacd.matchbox.api
-
Represents different chat channels in the Matchbox chat system.
- ChatMessage - Record Class in com.ohacd.matchbox.api
-
Immutable representation of a chat message with all metadata needed for routing.
- ChatMessage(Component, Component, Player, ChatChannel, String, boolean) - Constructor for record class com.ohacd.matchbox.api.ChatMessage
-
Creates a new ChatMessage with the current timestamp.
- ChatMessage(Component, Component, Player, UUID, ChatChannel, String, boolean, Instant) - Constructor for record class com.ohacd.matchbox.api.ChatMessage
-
Creates an instance of a
ChatMessagerecord class. - ChatProcessingResult(ChatResult, ChatMessage) - Constructor for record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Creates an instance of a
ChatProcessingResultrecord class. - ChatProcessor - Interface in com.ohacd.matchbox.api
-
Interface for custom chat processors that can modify, filter, or reroute chat messages.
- ChatProcessor.ChatProcessingResult - Record Class in com.ohacd.matchbox.api
-
Result of chat processing with optional modified message.
- ChatResult - Enum Class in com.ohacd.matchbox.api
-
Result of processing a chat message through the pipeline.
- clearChatProcessors(String) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Unregisters all custom chat processors from a specific session.
- com.ohacd.matchbox.api - package com.ohacd.matchbox.api
-
Public API for Matchbox.
- com.ohacd.matchbox.api.annotation - package com.ohacd.matchbox.api.annotation
- com.ohacd.matchbox.api.events - package com.ohacd.matchbox.api.events
- configBuilder() - Static method in class com.ohacd.matchbox.api.SessionBuilder
-
Creates a GameConfig builder for this session.
- createSessionBuilder(String) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Creates a new session builder for the specified session name.
- createSessionOnly() - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Creates the game session without starting the game.
- CURE - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Medic cures an infected player
- CureEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a cure action is performed (Medic cures an infected player).
- CureEvent(String, Player, Player, boolean) - Constructor for class com.ohacd.matchbox.api.events.CureEvent
-
Creates a new cure event.
D
- DELUSION - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Spark causes delusion (fake infection) on a player
- deny(ChatMessage) - Static method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Creates a DENY result.
- DENY - Enum constant in enum class com.ohacd.matchbox.api.ChatResult
-
Deny the message - it will not be sent to any recipients.
- DISCONNECTED - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Player was disconnected
- DISCONNECTED - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Player disconnected from the server
- discussionDuration(int) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets the discussion phase duration.
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.AbilityUseEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.CureEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.GameEndEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.GameStartEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.PhaseChangeEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.PlayerJoinEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.PlayerLeaveEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.PlayerVoteEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.SwipeEvent
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.MatchboxEvent
-
Dispatches this event to the appropriate listener method.
- dispatch(MatchboxEventListener) - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
E
- ELIMINATED - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Player was eliminated from the game
- endAllSessions() - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Ends all active game sessions gracefully.
- endGame() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Ends the game for this session.
- endSession(String) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Ends a game session gracefully.
- equals(Object) - Method in class com.ohacd.matchbox.api.ApiGameSession
- equals(Object) - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class com.ohacd.matchbox.api.SessionCreationResult
- error(String) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper.ValidationResult
-
Creates an error validation result.
- Experimental - Annotation Interface in com.ohacd.matchbox.api.annotation
-
Marks APIs that are experimental and may change in future releases.
F
- failure(SessionCreationResult.ErrorType, String) - Static method in class com.ohacd.matchbox.api.SessionCreationResult
-
Creates a failure result.
- forcePhase(GamePhase) - Method in class com.ohacd.matchbox.api.PhaseController
-
Forces the game to a specific phase.
- forcePhase(GamePhase) - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Deprecated.
- formattedMessage() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
formattedMessagerecord component.
G
- GAME - Enum constant in enum class com.ohacd.matchbox.api.ChatChannel
-
Game chat channel - messages from alive players visible to alive players and spectators.
- GAME_MANAGER_NOT_AVAILABLE - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Game manager is not available
- GameConfig - Class in com.ohacd.matchbox.api
-
Configuration class for game sessions.
- GameConfig(int, int, int, String, String, boolean, boolean) - Constructor for class com.ohacd.matchbox.api.GameConfig
-
Creates a new game configuration.
- GameConfig.Builder - Class in com.ohacd.matchbox.api
-
Builder class for creating GameConfig instances.
- GameEndEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a game ends (either by win condition or manual termination).
- GameEndEvent(String, GameEndEvent.EndReason, Collection<Player>, Map<Player, Role>, int) - Constructor for class com.ohacd.matchbox.api.events.GameEndEvent
-
Creates a new game end event.
- GameEndEvent.EndReason - Enum Class in com.ohacd.matchbox.api.events
-
Reasons why a game can end.
- GameStartEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a new game starts.
- GameStartEvent(String, Collection<Player>, Map<Player, Role>) - Constructor for class com.ohacd.matchbox.api.events.GameStartEvent
-
Creates a new game start event.
- getAbility() - Method in class com.ohacd.matchbox.api.events.AbilityUseEvent
-
Gets the type of ability that was used.
- getAlivePlayerCount() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the number of alive players in this session.
- getAlivePlayers() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets all currently alive players in this session.
- getAllSessions() - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets all active game sessions.
- getAttacker() - Method in class com.ohacd.matchbox.api.events.SwipeEvent
-
Gets the player who performed the swipe attack.
- getCurrentPhase() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the current game phase.
- getCurrentPhase() - Method in class com.ohacd.matchbox.api.PhaseController
-
Gets the current game phase.
- getCurrentPhase(String) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets the current game phase for a session.
- getCurrentRound() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the current round number.
- getCurrentRound() - Method in class com.ohacd.matchbox.api.events.PhaseChangeEvent
-
Gets the current round number.
- getDefaultMessage() - Method in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Gets the default human-readable message associated with this error type.
- getDiscussionDuration() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets the discussion phase duration in seconds.
- getErrorMessage() - Method in class com.ohacd.matchbox.api.ApiValidationHelper.ValidationResult
-
Gets the error message if validation failed.
- getErrorMessage() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Gets the error message if the creation failed.
- getErrorType() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Gets the error type if the creation failed.
- getFinalRoles() - Method in class com.ohacd.matchbox.api.events.GameEndEvent
-
Gets the final roles of all players who participated.
- getFromPhase() - Method in class com.ohacd.matchbox.api.events.PhaseChangeEvent
-
Gets the previous game phase.
- getInternalSession() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Deprecated.This method exposes internal implementation details. Use the provided API methods instead.
- getListeners() - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets all registered event listeners.
- getMedic() - Method in class com.ohacd.matchbox.api.events.CureEvent
-
Gets the player who performed the cure.
- getMedicSecondaryAbility() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets the Medic secondary ability setting.
- getName() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the name of this session.
- getPhaseController() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the phase controller for this session.
- getPhaseDescription() - Method in class com.ohacd.matchbox.api.PhaseController
-
Gets a description of the current phase state.
- getPlayer() - Method in class com.ohacd.matchbox.api.events.AbilityUseEvent
-
Gets the player who used the ability.
- getPlayer() - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Gets the player who was eliminated.
- getPlayer() - Method in class com.ohacd.matchbox.api.events.PlayerJoinEvent
-
Gets the player who joined the session.
- getPlayer() - Method in class com.ohacd.matchbox.api.events.PlayerLeaveEvent
-
Gets the player who left the session.
- getPlayerRole(Player) - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the role of a player in this session.
- getPlayerRole(Player) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets the current role of a player if they are in an active game.
- getPlayers() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets all players in this session.
- getPlayers() - Method in class com.ohacd.matchbox.api.events.GameStartEvent
-
Gets all players participating in the game.
- getPlayerSession(Player) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets the session a player is currently in.
- getReason() - Method in class com.ohacd.matchbox.api.events.GameEndEvent
-
Gets the reason why the game ended.
- getReason() - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Gets the reason for the elimination.
- getReason() - Method in class com.ohacd.matchbox.api.events.PlayerLeaveEvent
-
Gets the reason why the player left.
- getRemainingPlayers() - Method in class com.ohacd.matchbox.api.events.GameEndEvent
-
Gets all players still in the game when it ended.
- getRole() - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Gets the role of the eliminated player.
- getRoleAssignments() - Method in class com.ohacd.matchbox.api.events.GameStartEvent
-
Gets the role assignments for all players.
- getSession() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Gets the created session if successful.
- getSession(String) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Gets an existing game session by name.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.AbilityUseEvent
-
Gets the name of the session where the ability was used.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.CureEvent
-
Gets the name of the session where the cure occurred.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.GameEndEvent
-
Gets the name of the session that ended.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.GameStartEvent
-
Gets the name of the session where the game started.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.PhaseChangeEvent
-
Gets the name of the session where the phase changed.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Gets the name of the session where the elimination occurred.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.PlayerJoinEvent
-
Gets the name of the session the player joined.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.PlayerLeaveEvent
-
Gets the name of the session the player left.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.PlayerVoteEvent
-
Gets the name of the session where the vote occurred.
- getSessionName() - Method in class com.ohacd.matchbox.api.events.SwipeEvent
-
Gets the name of the session where the swipe occurred.
- getSparkSecondaryAbility() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets the Spark secondary ability setting.
- getStatusDescription() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets a human-readable status description of the session.
- getSwipeDuration() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets the swipe phase duration in seconds.
- getTarget() - Method in class com.ohacd.matchbox.api.events.AbilityUseEvent
-
Gets the target player of the ability.
- getTarget() - Method in class com.ohacd.matchbox.api.events.CureEvent
-
Gets the player who was cured.
- getTarget() - Method in class com.ohacd.matchbox.api.events.PlayerVoteEvent
-
Gets the player who was voted for.
- getTimeRemaining() - Method in class com.ohacd.matchbox.api.PhaseController
-
Gets the estimated time remaining in the current phase.
- getTimestamp() - Method in class com.ohacd.matchbox.api.MatchboxEvent
-
Gets the timestamp when this event was created.
- getToPhase() - Method in class com.ohacd.matchbox.api.events.PhaseChangeEvent
-
Gets the new game phase.
- getTotalPlayerCount() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets the total number of players in this session.
- getTotalRounds() - Method in class com.ohacd.matchbox.api.events.GameEndEvent
-
Gets the total number of rounds played.
- getValidationSummary(ApiValidationHelper.ValidationResult...) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Gets a summary of validation results.
- getVictim() - Method in class com.ohacd.matchbox.api.events.SwipeEvent
-
Gets the player who was attacked.
- getVoter() - Method in class com.ohacd.matchbox.api.events.PlayerVoteEvent
-
Gets the player who cast the vote.
- getVotingDuration() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets the voting phase duration in seconds.
- GLOBAL - Enum constant in enum class com.ohacd.matchbox.api.ChatChannel
-
Global chat channel - bypasses all game chat filtering and uses normal server chat.
H
- hashCode() - Method in class com.ohacd.matchbox.api.ApiGameSession
- hashCode() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns a hash code value for this object.
- hashCode() - Method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Returns a hash code value for this object.
- hashCode() - Method in class com.ohacd.matchbox.api.SessionCreationResult
- HEALING_SIGHT - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Medic uses Healing Sight to see infected players
- HUNTER_VISION - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Spark uses Hunter Vision to see all players
I
- INNOCENTS_WIN - Enum constant in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Innocents won (spark voted out)
- INSUFFICIENT_PLAYERS - Enum constant in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Game ended due to lack of players
- Internal - Annotation Interface in com.ohacd.matchbox.api.annotation
-
Marks APIs that are internal to the implementation and not intended for public consumption.
- INTERNAL_ERROR - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Internal error during session creation
- INVALID_DISCUSSION_LOCATION - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Discussion location is invalid
- isActive() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Gets whether this session is currently active.
- isAlivePlayer() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
isAlivePlayerrecord component. - isFailure() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Gets whether the session creation failed.
- isInGamePhase() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Checks if the session is currently in an active game phase.
- isPlayerAlive(Player) - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Checks if a specific player is alive in this session.
- isRandomSkinsEnabled() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets whether random skins are enabled.
- isRealInfection() - Method in class com.ohacd.matchbox.api.events.CureEvent
-
Gets whether the target had a real infection.
- isSuccess() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Gets whether the session creation was successful.
- isSuccessful() - Method in class com.ohacd.matchbox.api.events.SwipeEvent
-
Gets whether the swipe was successful.
- isUseSteveSkins() - Method in class com.ohacd.matchbox.api.GameConfig
-
Gets whether Steve skins are forced.
- isValid() - Method in class com.ohacd.matchbox.api.ApiValidationHelper.ValidationResult
-
Gets whether the validation was successful.
K
- KICKED - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Player was removed by admin
- KILLED_BY_SPARK - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Player was killed by a Spark
L
- LEFT_GAME - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Player left the game voluntarily
M
- MANUAL_END - Enum constant in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Game was ended manually by admin
- MatchboxAPI - Class in com.ohacd.matchbox.api
-
Main API class for interacting with the Matchbox plugin.
- MatchboxEvent - Class in com.ohacd.matchbox.api
-
Base class for all Matchbox events.
- MatchboxEvent() - Constructor for class com.ohacd.matchbox.api.MatchboxEvent
-
Creates a new MatchboxEvent with the current timestamp.
- MatchboxEvent(long) - Constructor for class com.ohacd.matchbox.api.MatchboxEvent
-
Creates a new MatchboxEvent with a specific timestamp.
- MatchboxEventListener - Interface in com.ohacd.matchbox.api
-
Interface for listening to Matchbox game events.
- medicAbility(String) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets the Medic secondary ability.
- message() - Method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Returns the value of the
messagerecord component.
N
- NO_PLAYERS - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
No valid players were provided
- NO_SPAWN_POINTS - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
No valid spawn points were provided
O
- onAbilityUse(AbilityUseEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a player uses a special ability.
- onCure(CureEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a cure action is performed.
- onGameEnd(GameEndEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a game ends (either by win condition or manual termination).
- onGameStart(GameStartEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a new game starts.
- onPhaseChange(PhaseChangeEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a game phase changes.
- onPlayerEliminate(PlayerEliminateEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a player is eliminated from the game.
- onPlayerJoin(PlayerJoinEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a player joins a game session.
- onPlayerLeave(PlayerLeaveEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a player leaves a game session.
- onPlayerVote(PlayerVoteEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a player casts a vote during the voting phase.
- onSwipe(SwipeEvent) - Method in interface com.ohacd.matchbox.api.MatchboxEventListener
-
Called when a swipe action is performed.
- originalMessage() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
originalMessagerecord component. - OTHER - Enum constant in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Other reasons
- OTHER - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Other reasons
- OTHER - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Other reasons
P
- PhaseChangeEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when the game phase changes.
- PhaseChangeEvent(String, GamePhase, GamePhase, int) - Constructor for class com.ohacd.matchbox.api.events.PhaseChangeEvent
-
Creates a new phase change event.
- PhaseController - Class in com.ohacd.matchbox.api
-
Utility class for managing game phases with simplified operations.
- PhaseController(GameSession) - Constructor for class com.ohacd.matchbox.api.PhaseController
-
Creates a new phase controller for the specified session.
- PlayerEliminateEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a player is eliminated from the game.
- PlayerEliminateEvent(String, Player, Role, PlayerEliminateEvent.EliminationReason) - Constructor for class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Creates a new player elimination event.
- PlayerEliminateEvent(String, Player, Role, PlayerEliminateEvent.EliminationReason, long) - Constructor for class com.ohacd.matchbox.api.events.PlayerEliminateEvent
-
Creates a new player elimination event with explicit timestamp.
- PlayerEliminateEvent.EliminationReason - Enum Class in com.ohacd.matchbox.api.events
-
Reasons why a player can be eliminated.
- PlayerJoinEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a player joins a game session.
- PlayerJoinEvent(String, Player) - Constructor for class com.ohacd.matchbox.api.events.PlayerJoinEvent
-
Creates a new player join event.
- PlayerLeaveEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a player leaves a game session.
- PlayerLeaveEvent(String, Player, PlayerLeaveEvent.LeaveReason) - Constructor for class com.ohacd.matchbox.api.events.PlayerLeaveEvent
-
Creates a new player leave event.
- PlayerLeaveEvent.LeaveReason - Enum Class in com.ohacd.matchbox.api.events
-
Reasons why a player can leave a session.
- PlayerVoteEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when a player casts a vote during the voting phase.
- PlayerVoteEvent(String, Player, Player) - Constructor for class com.ohacd.matchbox.api.events.PlayerVoteEvent
-
Creates a new player vote event.
- PLUGIN_NOT_AVAILABLE - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
The plugin instance is not available
- process(ChatMessage) - Method in interface com.ohacd.matchbox.api.ChatProcessor
-
Processes a chat message and returns the result.
R
- randomSkins(boolean) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets whether random skins are enabled.
- registerChatProcessor(String, ChatProcessor) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Registers a custom chat processor for a specific session.
- removeEventListener(MatchboxEventListener) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Removes an event listener.
- removePlayer(Player) - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Removes a player from this session.
- result() - Method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Returns the value of the
resultrecord component.
S
- sender() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
senderrecord component. - senderId() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
senderIdrecord component. - SESSION_EXISTS - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
A session with the given name already exists
- SESSION_MANAGER_NOT_AVAILABLE - Enum constant in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Session manager is not available
- SessionBuilder - Class in com.ohacd.matchbox.api
-
Builder class for creating and configuring game sessions.
- SessionBuilder(String) - Constructor for class com.ohacd.matchbox.api.SessionBuilder
-
Creates a new session builder with the specified session name.
- SessionCreationResult - Class in com.ohacd.matchbox.api
-
Result object for session creation operations that provides detailed success/failure information.
- SessionCreationResult.ErrorType - Enum Class in com.ohacd.matchbox.api
-
Enumeration of possible error types during session creation.
- sessionName() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
sessionNamerecord component. - skipToNextPhase() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Deprecated.Use
ApiGameSession.getPhaseController()andPhaseController.skipToNextPhase()for better error handling - skipToNextPhase() - Method in class com.ohacd.matchbox.api.PhaseController
-
Skips to the next phase in the natural progression.
- SPARK_SWAP - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Spark swaps positions with another player
- SPARK_WIN - Enum constant in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Spark won (all innocents eliminated)
- sparkAbility(String) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets the Spark secondary ability.
- SPECTATOR - Enum constant in enum class com.ohacd.matchbox.api.ChatChannel
-
Spectator chat channel - messages from spectators visible only to other spectators in the same session.
- start() - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Creates and starts the game session with the configured settings.
- startGame() - Method in class com.ohacd.matchbox.api.ApiGameSession
-
Starts the game for this session.
- startWithResult() - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Creates and starts the game session with detailed error reporting.
- steveSkins(boolean) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets whether Steve skins are forced.
- success() - Static method in class com.ohacd.matchbox.api.ApiValidationHelper.ValidationResult
-
Creates a successful validation result.
- success(ApiGameSession) - Static method in class com.ohacd.matchbox.api.SessionCreationResult
-
Creates a successful result.
- SWIPE - Enum constant in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Swipe attack (used by Spark)
- swipeDuration(int) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets the swipe phase duration.
- SwipeEvent - Class in com.ohacd.matchbox.api.events
-
Event fired when the swipe action is performed (Spark attacks another player).
- SwipeEvent(String, Player, Player, boolean) - Constructor for class com.ohacd.matchbox.api.events.SwipeEvent
-
Creates a new swipe event.
T
- timestamp() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns the value of the
timestamprecord component. - toOptional() - Method in class com.ohacd.matchbox.api.SessionCreationResult
-
Deprecated.Use
SessionCreationResult.getSession()for more detailed information - toString() - Method in class com.ohacd.matchbox.api.ApiGameSession
- toString() - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Returns a string representation of this record class.
- toString() - Method in record class com.ohacd.matchbox.api.ChatProcessor.ChatProcessingResult
-
Returns a string representation of this record class.
- toString() - Method in class com.ohacd.matchbox.api.events.PlayerEliminateEvent
- toString() - Method in class com.ohacd.matchbox.api.MatchboxEvent
- toString() - Method in class com.ohacd.matchbox.api.PhaseController
- toString() - Method in class com.ohacd.matchbox.api.SessionCreationResult
U
- unregisterChatProcessor(String, ChatProcessor) - Static method in class com.ohacd.matchbox.api.MatchboxAPI
-
Unregisters a custom chat processor from a specific session.
V
- validate() - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Validates the current builder configuration.
- validateDiscussionLocation(Location) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates a discussion location for session creation.
- validatePlayerCount(int) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates that the number of players is sufficient for a game.
- validatePlayers(Collection<Player>) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates a collection of players for session creation.
- validateSeatLocations(Map<Integer, Location>) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates seat locations for session creation.
- validateSessionName(String) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates a session name.
- validateSpawnCount(int, int) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates that the number of spawn points is sufficient for players.
- validateSpawnPoints(Collection<Location>) - Static method in class com.ohacd.matchbox.api.ApiValidationHelper
-
Validates a collection of spawn locations for session creation.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.ChatChannel
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.ChatResult
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.ohacd.matchbox.api.ChatChannel
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.ChatResult
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.events.AbilityUseEvent.AbilityType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.events.GameEndEvent.EndReason
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.ohacd.matchbox.api.SessionCreationResult.ErrorType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- VOLUNTARY - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerLeaveEvent.LeaveReason
-
Player voluntarily left the game
- VOTED_OUT - Enum constant in enum class com.ohacd.matchbox.api.events.PlayerEliminateEvent.EliminationReason
-
Player was voted out during voting phase
- votingDuration(int) - Method in class com.ohacd.matchbox.api.GameConfig.Builder
-
Sets the voting phase duration.
W
- withChannel(ChatChannel) - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Creates a copy of this message with a modified channel.
- withConfig(GameConfig) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets custom game configuration for the session.
- withCustomConfig(GameConfig) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets custom game configuration for the session.
- withDiscussionLocation(Location) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the discussion location for the session.
- withFormattedMessage(Component) - Method in record class com.ohacd.matchbox.api.ChatMessage
-
Creates a copy of this message with a modified formatted message.
- withPlayers(Collection<Player>) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the players for this session.
- withPlayers(Player...) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the players for this session.
- withSeatLocations(Map<Integer, Location>) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the seat locations for the discussion phase.
- withSpawnPoints(List<Location>) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the spawn points for players.
- withSpawnPoints(Location...) - Method in class com.ohacd.matchbox.api.SessionBuilder
-
Sets the spawn points for players.
All Classes and Interfaces|All Packages
ApiGameSession.getPhaseController()andPhaseController.forcePhase(GamePhase)for better error handling