Skip to content

How to use GetUsername() in C# Script? #2294

Answered by BruceChenQAQ
Sagittaro asked this question in Q&A
Discussion options

You must be logged in to vote

You can write ChatBot scripts to call all ChatBot's APIs.

(Save it as xx.cs)

//MCCScript 1.0

/* This is a sample script that will load a ChatBot into Minecraft Console Client
 * Simply execute the script once with /script or the script scheduler to load the bot */

MCC.LoadBot(new ExampleBot());

//MCCScript Extensions

/* The ChatBot class must be defined as an extension of the script in the Extensions section
 * The class can override common methods from ChatBot.cs, take a look at MCC's source code */

public class ExampleBot : ChatBot
{
    private const int SendLimit = 30;
    private const bool IsAlways = false;
    private const double SendInterval = 5.0; // second

    private int C…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sagittaro
Comment options

Answer selected by Sagittaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants