Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

collapse

Author Topic: Is there a method to return and set the command line of a command block?  (Read 109 times)

Fredashay

  • Plug-in Maker
  • Sr. Member

  • Offline
  • ****

  • 268
  • Reputation:
    +26/-1
  • Personal Text
    "Tira mah! This graw is fredashay!"
    • View Profile
    • ClockPie
Is there, huh?

JD9999

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 751
  • Reputation:
    +45/-0
    • View Profile
Re: Is there a method to return and set the command line of a command block?
« Reply #1 on: September 08, 2017, 06:16:47 AM »
You can use MC_CommandSenderInfo.lastCommand to return the command currently in the command block.

Theoretically, you could call this after the onAttemptPlaceOrInteract method, by checking if it is a command block, and then calling MC_Server.getExecutingCommandInfo() to obtain an MC_CommandSenderInfo object.

Fredashay

  • Plug-in Maker
  • Sr. Member

  • Offline
  • ****

  • 268
  • Reputation:
    +26/-1
  • Personal Text
    "Tira mah! This graw is fredashay!"
    • View Profile
    • ClockPie
Re: Is there a method to return and set the command line of a command block?
« Reply #2 on: September 08, 2017, 05:08:03 PM »
Thanks!  But can I set the command?

JD9999

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 751
  • Reputation:
    +45/-0
    • View Profile
Re: Is there a method to return and set the command line of a command block?
« Reply #3 on: September 08, 2017, 05:47:57 PM »
Sorry, I don't think so.

Fredashay

  • Plug-in Maker
  • Sr. Member

  • Offline
  • ****

  • 268
  • Reputation:
    +26/-1
  • Personal Text
    "Tira mah! This graw is fredashay!"
    • View Profile
    • ClockPie
Re: Is there a method to return and set the command line of a command block?
« Reply #4 on: September 09, 2017, 02:53:06 PM »
Bummer.  But thanks!

 

* Notifications

* Member Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Topics

Re: MCPublic -- Free server hosting by Reinert
[November 07, 2017, 06:53:51 AM]


Re: How does onPlayerDeath work? by JD9999
[October 04, 2017, 03:30:31 PM]


Re: How does onPlayerDeath work? by CodeCrafter47
[October 04, 2017, 04:53:08 AM]


How does onPlayerDeath work? by JD9999
[October 03, 2017, 07:58:47 PM]

* Forum Stats

  • stats Total Members: 3682
  • stats Total Posts: 12304
  • stats Total Topics: 1663
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568