Question Regarding UUIDs

Discussion in 'Plugin Development' started by IcyRelic, May 28, 2014.

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

    IcyRelic

    Im trying up update my ban plugin but dont know how to get an offline players uuid and this just came to mind

    on a non griefing server i use prism on mine what will happen if JohnDoe griefs and changes his name to janedoe his uuid is nolonger going to be with JohnDoe so then the banned player can just come on again because he changes his name before he is banned
     
  2. Offline

    Monkey_Swag

    When a player changes his name, his uuid doesn't. Why wouldn't he stay banned if he changes his name?
     
  3. Offline

    Jogy34

    This will help you with getting player's UUID's by their name: http://forums.bukkit.org/threads/player-name-uuid-fetcher.250926/

    If you ban a player using their UUID, it shouldn't matter (if it's set up correctly) if they change their name as they will still be connected to the same UUID. If you bane them by their name then a name change will allow them on to your server again. And if they have multiple accounts your best bet would be to ban them by their IP however that still isn't full proof.
     
  4. Offline

    IcyRelic

    because if im trying to get a uuid from a name the name is nolonger linked to that uuid the new name is wouldnt it
    cuz the name can be used by someojne else

    Got this error

    Code:
    [16:24:47 INFO]: IcyRelic issued server command: /ban IcyRelic test
    [16:24:47 WARN]: java.io.IOException: Server returned HTTP response code: 400 for URL: https://api.mojang.com/profiles/minecraft
    [16:24:47 WARN]:    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    [16:24:47 WARN]:    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    [16:24:47 WARN]:    at me.icyrelic.com.UUIDUtils.call(UUIDUtils.java:39)
    [16:24:47 WARN]:    at me.icyrelic.com.UUIDUtils.getUUIDOf(UUIDUtils.java:94)
    [16:24:47 WARN]:    at me.icyrelic.com.Commands.ban.onCommand(ban.java:43)
    [16:24:47 WARN]:    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [16:24:47 WARN]:    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180)
    [16:24:47 WARN]:    at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:728)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:985)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:830)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:65)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:180)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java:81)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:713)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:283)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482)
    [16:24:47 WARN]:    at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628)
    [16:24:47 INFO]: IcyRelic lost connection: §6You were banned by: §eIcyRelic§6 Reason: §etest
    [16:24:47 INFO]: ||Owner|| IcyRelic Has Left The Server!
    [16:24:47 INFO]: icyrelic was banned by IcyRelic. Reason: test
    
    and here is what it put in my database

    [​IMG]

    returned it as null

    My code for getting the uuid

    Code:java
    1. String player = args[0];
    2. UUID uid = null;
    3. try {
    4. uid = UUIDUtils.getUUIDOf(player);
    5. } catch (Exception e) {
    6. e.printStackTrace();
    7. }


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  5. Offline

    IcyRelic

    Bump i still need to resolve this error
     
Thread Status:
Not open for further replies.

Share This Page