Need help with storing players

Discussion in 'Plugin Development' started by OgishaYT, Aug 28, 2022.

Thread Status:
Not open for further replies.
  1. Offline

    OgishaYT

    So, I am working on a /warn command.
    I need help with storing those warnings and players in a .yml file.
    I imagine something like this:
    When the player first time joins, his name is registered and stored in .yml, and when he gets warned, warnings and string reasons just get added onto his name.

    EDIT: For every command, I have a different package.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @OgishaYT Pass the main instance along to the packages that handle the command.
    Have a method in the main instance like addWarning(UUID, String)
     
  3. Offline

    Strahan

    Also I'd not worry about storing them in a file until such time as said data are required. Because on a busy server you'll get a LOT of pointless files from people who join then quit soon after, and even from regular players who never do anything to necessitate a warning.
     
  4. Offline

    Kars

Thread Status:
Not open for further replies.

Share This Page