Discussion in 'Programming' started by J4combo, Jun 30, 2016.

  1. Hey,
    I tried to develop a UUID Coin System. It works but if I change my name I havn't my Coins.
    Here is the create method. Maybe you can help me:

    public static void create(String Playername) {
    if (!exists(Playername)) {
    MySQLCOINS.update("INSERT INTO Coins (Playername, UUID, COINS) VALUES ('" + Playername + "', '" + UUID.getUUID(Playername) + "', '0')");
    } else
    MySQLCOINS.update("UPDATE Coins SET Playername='" + Playername + "' WHERE UUID='" + UUID.getUUID(Playername) + "'");
    • Like Like x 1
  2. You try to create an UUID of a player name, that isn't possible. Take a loot at this tutorial to see how you fix it.
  3. Don't store their data by playername. Store it using their UUID ( Player#getUniqueID() ).
  4. Playernames are not UUIDs, what did you expect UUID.getUUID() to do?
  5. Thats is a method to get the UUID from a Player.
  6. This is incorrect. You want Player#getUniqueID().