Class PlayerController
java.lang.Object
me.clientastisch.cardinal.controller.PlayerController
- Since:
- CAC v. 5.4.30
- Author:
- micartey
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the movement processor.Get the network processorGet the sensitivity processorGet the version of a player based on its packet protocol id.booleanCheck if a player is a bedrock player using the floodgate api.booleanCheck if a player is whitelisted / exempt from being detected.static PlayerControllerGet a PlayerController for a bukkit player outside of events.voidsetShowingFlags(boolean showingFlags) Enable or disable flags / alerts for the current player.voidsetVerified(boolean verify, PlayerController.Verify state) Verified players are not checked for many things.voidsetWhitelistedForMs(long time) Whitelist a player for a certain amount of time.
-
Constructor Details
-
PlayerController
public PlayerController()
-
-
Method Details
-
getVersion
Get the version of a player based on its packet protocol id.- Returns:
- Version enum
-
isFloodgatePlayer
public boolean isFloodgatePlayer()Check if a player is a bedrock player using the floodgate api.- Returns:
- true if player is on bedrock
-
isWhitelisted
public boolean isWhitelisted()Check if a player is whitelisted / exempt from being detected. Players in creative / spectator are considered whitelisted.- Returns:
- true if player shall be ignored
-
setWhitelistedForMs
public void setWhitelistedForMs(long time) Whitelist a player for a certain amount of time. If player is already whitelisted, it will not do anything.- Parameters:
time- time in millseconds
-
setVerified
Verified players are not checked for many things. Mostly packet based cheats and some other things here and there. This is not being used by the anticheat beside some commands that can be used by staff. So it is your responsibility to incorperate this into your server system if wanted.- Parameters:
verify- the statestate- the type of verificationPlayerController.Verify
-
setShowingFlags
public void setShowingFlags(boolean showingFlags) Enable or disable flags / alerts for the current player. Using this method ignores permission.- Parameters:
showingFlags- state
-
getSensitivityProcessor
Get the sensitivity processor- Returns:
- sensitivity processor
-
getMovementProcessor
Get the movement processor. It offers some QoL improvements to handle and work with movement.- Returns:
- movement processor
-
getNetwork
Get the network processor- Returns:
- network processor
-
of
Get a PlayerController for a bukkit player outside of events. This method is being used inside of the events as well, but hidden behind abstraction.- Parameters:
player- bukkit player- Returns:
- Reference of PlayerController for player
-