Need small help

Discussion in 'Spigot Plugin Help' started by Nighterance, Apr 22, 2017.

  1. Hello!
    I am now starting to think about one thing. I have command, that opens a gui for player, and that gui is in different class than the command is. I need to get playername, who is sender to command, that opens gui. What wouls be best way to do? I tryed to add in class player sender = (Player) sender but it did not work. Thanks!
     
  2. You can't cast s to player s. Do "Player player = (Player) sender
     
  3. upload_2017-4-22_11-31-49.png
    This happens when I try to do Player z = (Player) sender
    But keep in ming, I don't need this in command execution, there it would work, but i need it in class, where is the gui (need the name of who ran command and put it in gui block name)
     
  4. Do not pay attention
     
  5. anyone? Hope someone has any idea :)
     
  6. Are you blind? It says it cannot be resolved to a variable. Someone tried to help you but you refused to acknowledge their reply, wtf? It sounds like you don't want to help yourself. Incase you are actually blind and for some reason can only see my messages and yours, here's what they said,
     
  7. I know, I already did that but it did not work, and no need to say that I am blind. I already fixed my problem, but not that way.
    Close.