What the hell do we do when players are able to change their names?

Discussion in 'Bukkit Discussion' started by nichiatu, May 6, 2012.

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

    nichiatu

    So, in the very near future, Jeb will implement player name-change into Minecraft. Now, bans work with name and IP, but will there also be a function for fetching a player-id and ban the player using that?

    Right now there's a function called getUniqueUID which returns a 128-byte numeric value, and inserting this into a MySQL table is just not possible, because it's twice the size. What could be a fix for this though, is inserting it into a text column, and then converting it into a numeric value upon extraction from the database.

    Did Jeb think this through?
     
  2. Offline

    codename_B

    You could probably insert a hash of it or something...

    Wait and see what happens!
     
  3. Offline

    phrstbrn

    An amateur might do this.. a clever person would use two bigint columns...

    Code:
    CREATE TABLE player (
      `id` int unsigned not null AUTO_INCREMENT,
      `uuid_mostsigbits` bigint not null,
      `uuid_leastsigbits` bigint not null,
      primary key (`id`),
      index `uuid` (`uuid_mostsigbits`, `uuid_leastsigbits`)
    )
    
    Fast searching w/ indexes!

    Code:
    SELECT * FROM player WHERE uuid_mostsigbits = ? AND uuid_leastsigbits = ?
    
     
  4. Offline

    7cardcha

    The player will have a unique id and a name most likely with everything important being based of the id.
     
  5. Offline

    4therace

    If you can change your name, I sense more evil! This is a perfect for hackers/griefers.
    7cardcha I hope you're right!
     
Thread Status:
Not open for further replies.

Share This Page