mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
App refactoring almost done
- Created specific namespaces and folders for each app brick - Added proxy support using Starksoft's Biko Library - App bricks: Main, ChatBots, Crypto, Protocol, Proxy - Each class is now in its own file (Aes streams, chatbots) - Used "Bridge" design pattern for Crypto, Protocol, Proxy - Added back support for Minecraft 1.4.6 to 1.6.4 (MCC 1.6.2) - Need to fully re-test everything and fix bugs - To Fix : Server pinging is slow on SpigotMC - To Do : Add Minecraft 1.2.5 (MCC 1.3) and maybe 1.3 to 1.4.5
This commit is contained in:
parent
9be1d99ca0
commit
d2ec2f48b7
43 changed files with 6039 additions and 2178 deletions
44
MinecraftClient/Protocol/IMinecraftComHandler.cs
Normal file
44
MinecraftClient/Protocol/IMinecraftComHandler.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MinecraftClient.Protocol
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for the MinecraftCom Handler.
|
||||
/// It defines some callbacks that the MinecraftCom handler must have.
|
||||
/// It allows the protocol handler to abstract from the other parts of the program.
|
||||
/// </summary>
|
||||
|
||||
public interface IMinecraftComHandler
|
||||
{
|
||||
/* The MinecraftCom Hanler must
|
||||
* provide these getters */
|
||||
|
||||
int getServerPort();
|
||||
string getServerHost();
|
||||
string getUsername();
|
||||
string getUserUUID();
|
||||
string getSessionID();
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when the protocol handler receives a chat message
|
||||
/// </summary>
|
||||
|
||||
void OnTextReceived(string text);
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when the connection has been lost
|
||||
/// </summary>
|
||||
|
||||
void OnConnectionLost(ChatBot.DisconnectReason reason, string message);
|
||||
|
||||
/// <summary>
|
||||
/// Called ~10 times per second (10 ticks per second)
|
||||
/// Useful for updating bots in other parts of the program
|
||||
/// </summary>
|
||||
|
||||
void OnUpdate();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue