defined CommandSender

Discussion in 'Bukkit Help' started by Roan1, Aug 30, 2011.

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

    Roan1

    Firstefull, sorry for my bad english.
    Please, write me small sourcecode.
    I need to define "CommandSender".
    Watch:
    Event OnCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
    sender must be = "Roan", even if the player is not in the game.
    Problem: incompatible types
    required: org.bukkit.command.CommandSender
    found: java.lang.String
    Help me please.
     
  2. Offline

    bassfader

    try to use getServer().getPlayer("Roan") as a command sender (but remember this will only work if the player "Roan" has been online at least once on your server, if he never was online the getPlayer() method will return null)

    If thats not what you asked for, please rephrase your question with a bit more of information, and maybe some sample code so its easier for us to understand what you are trying to do.
     
Thread Status:
Not open for further replies.

Share This Page