So, I recently bought a map off of the Auction House on Survival, and to my surprise, it provides java code. It reads:
@ Override
public void onCommand() {
if(label.equals("cool"){
s.sendMessage("you are cool");
}
return true;
}
Now, I'm already acquainted with Java, however, I've never actually looked into Minecraft's functions, so I don't know which Methods are being called to in the code. I'm assuming that it'll print the text "you are cool" into the chat upon word-checking for "cool" from the host, but that isn't really my main concern.
My question is... where do I throw this little tidbit to run it effectively?
I know that I can't just throw it into a new Java project on Eclipse, since it relies off of pre-existing Methods written in Minecraft's coding. I don't think it'll let me jus throw it into the chat, either.
Ideas? Thoughts? I've never really messed around with Minecraft enough to know where it would look for code entry, so ehhh... some assistance would be helpful. Thanks!
@ Override
public void onCommand() {
if(label.equals("cool"){
s.sendMessage("you are cool");
}
return true;
}
Now, I'm already acquainted with Java, however, I've never actually looked into Minecraft's functions, so I don't know which Methods are being called to in the code. I'm assuming that it'll print the text "you are cool" into the chat upon word-checking for "cool" from the host, but that isn't really my main concern.
My question is... where do I throw this little tidbit to run it effectively?
I know that I can't just throw it into a new Java project on Eclipse, since it relies off of pre-existing Methods written in Minecraft's coding. I don't think it'll let me jus throw it into the chat, either.
Ideas? Thoughts? I've never really messed around with Minecraft enough to know where it would look for code entry, so ehhh... some assistance would be helpful. Thanks!