CommandHelper

CommandHelper

46.5k Downloads

capture_runas(~console, '/runalias /myalias myargument')

LadyCailinBot opened this issue ยท 1 comments

commented

CMDHELPER-3108 - Reported by Hazae41

Using build 2966 on Spigot 1.8.8

  • capture_runas(~console, '/runalias /myalias myargument') -> the alias "/myalias myargument" is not executed
  • capture_runas(PlayerA, '/mycommand') -> the command is executed from the console instead of the player PlayerA
  • scriptas(~console, myfunction()) -> PlayerOfflineException: expecting a player name, but "~console" was found.

I tried to make a simple alias that execute a command from the targetted player (or console) and that shows the returned message.

My alias was like that:
~admin:/sudo $target $ = >>>
@return = capture_runas($target, $)
if(@return != ''){
msg(@return)
}
<<<

commented

Just going to close this. capture_runas is a best effort function, and if it doesn't work, it doesn't work.