Kick/ban Counter

Discussion in 'Spigot Plugin Development' started by Livaco, May 17, 2017.

  1. Hey, i just wanted to confirm somthing before i do it.
    for my plugin WarnSystem, i wanted to add a feture, where after 3 warns, the user gets kicked, and after 6 warns, the user gets banned for a hour. Now i tryed adding this just before the case commands:

    Code (Text):
    // Kick and Warn Counters
    int kickcount = 0; // if 3 = kick
    int bancount = 0; // if 6 = ban
    and then every time the command is executed fully on a player:
    Code (Text):
    then i relised how would i only add that to the one player? how would i do that?

  2. store the data on a file and request the file on lookup ( recommended because of server stops or reloads because otherwise your data will be lost)
    Or, create a Map that contains the Player as a Key and the Kick / Ban Count as an Integer.
  3. how would i do that?