Cuberite Forum
[SOLVED] Player UUID from command - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: [SOLVED] Player UUID from command (/thread-2094.html)



[SOLVED] Player UUID from command - DrMasik - 09-01-2015

I need UUID in function running after user input some command. Can I get it?

I have Info.lua code:
Code:
Name = "Plug1",
  Version = "0",
  Date = "2015-08-31",
  Description = [[Plug1]],

  Commands = {
    ["/cmd1"] = {
      HelpString = "cmd1 desc",

      Subcommands = {

        sub1= {
          HelpString = "sub1 desc",
          Handler = Commandsub1,
        },
      },
    },
  }

Handler function:
Code:
function Commandsub1(Split)
  -- cPlayer:GetUUID() -- <---???????
end

Thank you.


RE: Player UUID from command - NiLSPACE - 09-01-2015

The handler looks like this:
function MyCommandHandler(Split, Player)
   local UUID = Player:GetUUID()
end



RE: Player UUID from command - DrMasik - 09-01-2015

I feel like a fool. Thank you.


RE: Player UUID from command - NiLSPACE - 09-01-2015

No problem Smile