Class GagManager
java.lang.Object
games.stendhal.server.entity.player.GagManager
- All Implemented Interfaces:
LoginListener
Manages gags.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkIsGaggedAndInformPlayer(Player player)
Like isGagged(player) but informs the player in case it is gagged.void
static GagManager
get()
returns the GagManager object (Singleton Pattern).long
getTimeRemaining(Player criminal)
Gets time remaining in milliseconds.static boolean
Is player gagged?void
onLoggedIn(Player player)
Is called after a player logged into the game.void
Removes a gag.
-
Method Details
-
get
returns the GagManager object (Singleton Pattern).- Returns:
- GagManager
-
gag
- Parameters:
criminalName
- The name of the player who should be gaggedpoliceman
- The name of the admin who wants to gag the criminalminutes
- The duration of the sentencereason
- why criminal was gagged
-
release
Removes a gag.- Parameters:
inmate
- player who should be released
-
isGagged
Is player gagged?- Parameters:
player
- player to check- Returns:
- true, if it is gagged, false otherwise.
-
checkIsGaggedAndInformPlayer
Like isGagged(player) but informs the player in case it is gagged.- Parameters:
player
- player to check- Returns:
- true, if it is gagged, false otherwise.
-
onLoggedIn
Description copied from interface:LoginListener
Is called after a player logged into the game.- Specified by:
onLoggedIn
in interfaceLoginListener
- Parameters:
player
- the player who has logged in
-
getTimeRemaining
Gets time remaining in milliseconds.- Parameters:
criminal
- player to check- Returns:
- time remaining in milliseconds
-