Class GagManager
java.lang.Object
games.stendhal.server.entity.player.GagManager
- All Implemented Interfaces:
LoginListener
Manages gags.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIsGaggedAndInformPlayer(Player player) Like isGagged(player) but informs the player in case it is gagged.voidstatic GagManagerget()returns the GagManager object (Singleton Pattern).longgetTimeRemaining(Player criminal) Gets time remaining in milliseconds.static booleanIs player gagged?voidonLoggedIn(Player player) Is called after a player logged into the game.voidRemoves 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:LoginListenerIs called after a player logged into the game.- Specified by:
onLoggedInin 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
-