Skip to content

NegativityPlayer

Elikill58 edited this page Sep 19, 2020 · 2 revisions

General

The NegativityPlayer contains Negativity's data, specially for check, bypass or set back options. It also manage active cheat detection, thanks to auto verif, and Active cheat list.

PlatformNegativityPlayer (v1)

For v1, there is SpigotNegativityPayer and SpongeNegativityPlayer. You can get them by calling PlatformNegativityPlayer.getNegativityPlayer(player);

Both have those method :

  • NegativityAccount getAccount()
  • Object getPlayer()
  • boolean hasDefaultPermission(String s)
  • int getWarn(Cheat c)
  • double getLife()
  • String getName()
  • String getGameMode()
  • float getWalkSpeed()
  • int getLevel()
  • void kickPlayer(String reason, String time, String by, boolean def)
  • void banEffect()
  • void startAnalyze(Cheat c)
  • void startAllAnalyze()
  • void updateMinerateInFile()
  • boolean isOp()

NegativityPlayer (v2)

Now, there is a common NegativityPlayer which is obtainable thanks to NegativityPlayer.getPlayer(player)

Some of method contained in v1 NegativityPlayer are now on the player.

  • NegativityAccount getAccount()
  • UUID getUUID()
  • String getName()
  • boolean isBedrockPlayer()
  • boolean hasDetectionActive(cheat) (check also bypass ...)
  • int getWarn(cheat)
  • Player getPlayer()
  • void kickPlayer(String reason, String time, String by, boolean def) (for ban kick)
  • void addWarn(cheat, reliability)
  • void clearPackets()
  • void logProof(message)
  • List<PlayerCheatAlertEvent> getAlertForAllCheat()
  • boolean isTargetByIronGolem()

To don't create a lof of variable, there is content for specific type. For example : Content<Integer> ints contains temporary integer data. I organise data in it like than: CheatKey > DataName > data.