How to remove Metadata from a player

Discussion in 'Spigot Plugin Development' started by SchlauiiiYT, Sep 14, 2019.

  1. Hello I programmed a plugin which switches a command (/ notify) so that you can turn it on and off. I did that with the help of metadata. That is, if the player enters this once it goes on and if he enters it again then it goes off. But I have a problem. Once I turn it off, it will not work anymore. I've already noticed that it's because of the metadata. Now my question is, how do I remove metadata from a player?
  2. You could create a Set storing the UUID of the players which you could use to see whether the players have entered the command already once.