Create playerdata for a fake player

Discussion in 'Plugin Development' started by Blutrecht, Oct 3, 2021.

  1. Offline


    I'm struggling with creating new playerdata (the server's one in /world/playerdata/[uuid].dat). I write a plugin which should make fake players to be banks (but in fact regular fake players) and hold money (I use Vault API). I thought that this one would do its job:

      PlayerProfile profile = Bukkit.createProfile(UUID.randomUUID(), bankName);
    I use Paper 1.17.1 as my dependency.

    However no playerdata is created and if I try to check if this player exists in game, it says that it can't find it. I also use CMI plugin and I would like the solution that is compatible with this (I mean that this new player will be instantly recognized by it - that it exists).

    Is there any method to create a [uuid].dat file? Or should I write my custom method, and if so, how should I start with that?

    I would be grateful for any hints on that, since I've been looking for a solution for a quite lot of time and that's one of the last things I need in my plugin to be usable. Thank you for your help.
  2. Offline


    This seems like an XY problem. Why do you need fake players to hold money? If you are using the Vault API there is no need to do this

Share This Page