public class NegativityPlayer extends Object
Constructor and Description |
---|
NegativityPlayer(Player p) |
Modifier and Type | Method and Description |
---|---|
long |
addWarn(Cheat c,
int reliability,
long amount)
Add multiple warn
|
void |
banEffect()
Create ban effect
|
void |
clearClick() |
void |
clearPackets()
Call
PlayerPacketsClearEvent and then clear all packets |
void |
destroy()
Save and destroy Negativity player and account
|
void |
fight()
Make the player currently in fight
|
NegativityAccount |
getAccount()
Get the Negativity account of the player
|
List<PlayerCheatAlertEvent> |
getAlertForAllCheat()
Compile and return all cheat alert for each cheat
|
PlayerCheatAlertEvent |
getAlertForCheat(Cheat c,
List<PlayerCheatAlertEvent> list)
Compile the list of alert into one of the given cheat
|
static List<NegativityPlayer> |
getAllNegativityPlayers() |
static Map<UUID,NegativityPlayer> |
getAllPlayers()
Get all uuid and their negativity players
|
long |
getAllWarn(Cheat c)
Get all warn of the cheat
|
static NegativityPlayer |
getCached(UUID playerId)
Get the negativity player in cache of the given UUID
|
<D extends CheckData> |
getCheckData(Cheat cheat) |
ArrayList<CheckProcessor> |
getCheckProcessors()
Get active check processors
|
int |
getClick() |
String |
getClientName()
Get the name of the client such as vanilla/fabric...
|
String |
getName()
Get the player name
|
static NegativityPlayer |
getNegativityPlayer(Player p)
Get the Negativity Player or create a new one
|
static NegativityPlayer |
getNegativityPlayer(UUID uuid,
Callable<Player> call)
Get the Negativity Player or create a new one
|
Location |
getPingedLocation() |
Player |
getPlayer()
Get the player
|
String |
getReason(Cheat c)
Get the reason of the given cheat
|
UUID |
getUUID()
Get the player UUID
|
long |
getWarn(Cheat c)
Get warn of the cheat
|
String |
getWhyDetectionNotActive(Cheat c) |
boolean |
hasDetectionActive(Cheat c)
Check if the player have be detected for the given cheat
It also check for bypass and TPS drop
|
boolean |
isBedrockPlayer()
Check if it's a bedrock player
|
boolean |
isTargetByIronGolem()
Check if the player is target by a golem
|
void |
kickPlayer(String reason,
String time,
String by,
boolean def)
Kick the player after a ban
|
void |
makeAppearEntities()
Make fake player appears
|
static void |
removeFromCache(UUID playerId)
Remove the player from cache
|
void |
setClientName(String clientName)
Set the name of the client such as vanilla/fabric...
|
void |
setWarn(Cheat c,
int alerts)
Set a new value for the amount of alert of the given cheat
|
void |
unfight()
Make the player no longer in fight
|
public ArrayList<CheckProcessor> checkProcessors
public HashMap<CheatKeys,List<PlayerCheatAlertEvent>> alertNotShowed
public ConcurrentHashMap<PacketType,Integer> packets
public int allPackets
public int lastClick
public int noFallDamage
public int idWaitingAppliedVelocity
public Material eatMaterial
public List<PotionEffect> potionEffects
public long loginTime
public long timeInvincibility
public int rightBlockClick
public int leftBlockClick
public int entityClick
public int leftCancelled
public int leftFinished
public int iceCounter
public int blockAbove
public FlyingReason flyingReason
public boolean isOnLadders
public boolean isTeleporting
public ConcurrentHashMap<IDetectionKey<?>,CheckData> checkDatas
public Location delta
public Location lastDelta
public boolean isInFight
public boolean isFreeze
public boolean isUsingSlimeBlock
public boolean isUsingJumpBoost
public boolean isInvisible
public boolean isAttacking
public boolean shouldCheckSensitivity
public double sensitivity
public NegativityPlayer(Player p)
public NegativityAccount getAccount()
public UUID getUUID()
public String getName()
public boolean isBedrockPlayer()
public boolean hasDetectionActive(Cheat c)
c
- the cheat which we are trying to detectpublic long getWarn(Cheat c)
c
- the cheatpublic long getAllWarn(Cheat c)
c
- the cheatpublic Player getPlayer()
public String getClientName()
public void setClientName(String clientName)
clientName
- the new client namepublic Location getPingedLocation()
public void kickPlayer(String reason, String time, String by, boolean def)
reason
- the reason of kicktime
- the time of the ban which make the kickby
- who kick the playerdef
- if the ban is definitivepublic long addWarn(Cheat c, int reliability, long amount)
c
- the cheat which create alertreliability
- the reliability of all warnamount
- the amount of alertpublic void setWarn(Cheat c, int alerts)
c
- the cheatalerts
- the new amount of alertpublic void clearPackets()
PlayerPacketsClearEvent
and then clear all packetspublic String getReason(Cheat c)
c
- the cheatpublic List<PlayerCheatAlertEvent> getAlertForAllCheat()
public PlayerCheatAlertEvent getAlertForCheat(Cheat c, List<PlayerCheatAlertEvent> list)
c
- the cheat of all alertlist
- all last alert of the cheatpublic void destroy()
public void fight()
public void unfight()
public ArrayList<CheckProcessor> getCheckProcessors()
public boolean isTargetByIronGolem()
public void makeAppearEntities()
public void banEffect()
public int getClick()
public void clearClick()
public static NegativityPlayer getNegativityPlayer(Player p)
p
- the player which we are looking for it's NegativityPlayerpublic static NegativityPlayer getNegativityPlayer(UUID uuid, Callable<Player> call)
uuid
- the player UUIDcall
- a creator of a new playerpublic static NegativityPlayer getCached(UUID playerId)
playerId
- the player UUIDpublic static Map<UUID,NegativityPlayer> getAllPlayers()
public static List<NegativityPlayer> getAllNegativityPlayers()
public static void removeFromCache(UUID playerId)
playerId
- the player UUID