dispatchCommand Which event is raised?

Discussion in 'Bukkit Help' started by boduzapho, May 3, 2012.

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

    boduzapho

    I am trying to interface my plugin system with another 3rd party plugin, it uses the dispatchCommand to execute commands on my server. The plugin is Buycraft and it is used to automatically give my users bought items. The problem is I cannot find the even that is raised when dispatchCommand executes.

    I have tried : ServerCommandEvent, PlayerCommandPreprocessEvent, CommandSender

    CommandSender seems to be raise but I do not get the parameters, only the command, no arguements are being transfered:

    5/3/2012 11:48:31 PM [INFO] [Buycraft] Executing claimable command(s) on behalf of user 'boduzapho' due to purchasing package #60.
    5/3/2012 11:48:31 PM [INFO] CommandSender ===> message : tickets[Ljava.lang.String;@1dd9c62e
    5/3/2012 11:48:31 PM [INFO] /tickets
    5/3/2012 11:48:31 PM [INFO] CommandSender ===> message : bcast[Ljava.lang.String;@44620551
    5/3/2012 11:48:31 PM [INFO] /bcast

    I'm telling it to print out the command and all arguments to the console which produced the output above. is there another way to retrieve the message with the parameters that I am not aware of and that may not populate the args[] array?

    Does anyone know how I can capture the command so I can process it properly? (I do not use any 3rd party plugins, like... Permissions, or World Guard or Essentials). I have my own system which works well for me, except for this little bump in the road.

    Any help is greatly appreciated.

    SOLVED!

    I AM the king of idiots...

    at the top of my event -> if (sender instanceof Player) - FACEPALM!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
Thread Status:
Not open for further replies.

Share This Page