using System;
using TrueCraft.API.World;
using TrueCraft.API.Entities;
using TrueCraft.API.Windows;
using TrueCraft.API.Server;
namespace TrueCraft.API.Networking
{
public interface IRemoteClient
{
///
/// Minecraft stream used to communicate with this client.
///
IMinecraftStream MinecraftStream { get; }
///
/// Returns true if this client has data pending in the network stream.
///
bool DataAvailable { get; }
///
/// The world this client is present in.
///
IWorld World { get; }
///
/// The entity associated with this client.
///
IEntity Entity { get; }
///
/// This client's inventory.
///
IWindow Inventory { get; }
///
/// The username of the connected client. May be null if not yet ascertained.
///
string Username { get; }
///
/// The slot index this user has selected in their hotbar.
///
short SelectedSlot { get; }
///
/// The item stack at the slot the user has selected in their hotbar.
///
ItemStack SelectedItem { get; }
///
/// The server this user is playing on.
///
IMultiplayerServer Server { get; }
///
/// If true, this client will be sent logging information as chat messages.
///
bool EnableLogging { get; set; }
///
/// The time the user is expected to complete the active digging operation,
/// depending on what kind of block they are mining and what tool they're using
/// to do it with.
///
DateTime ExpectedDigComplete { get; set; }
///
/// True if this client has been disconnected. You should cease sending packets and
/// so on, this client is just waiting to be reaped.
///
bool Disconnected { get; }
///
/// Loads player data from disk for this client.
///
bool Load();
///
/// Saves player data to disk for this client.
///
void Save();
///
/// Queues a packet to be sent to this client.
///
void QueuePacket(IPacket packet);
///
/// Disconnects this client from the server.
///
void Disconnect();
///
/// Sends a chat message to this client.
///
void SendMessage(string message);
///
/// If logging is enabled, sends your message to the client as chat.
///
void Log(string message, params object[] parameters);
///
/// Opens a window on the client. This sends the appropriate packets and tracks
/// this window as the currently open window.
///
void OpenWindow(IWindow window);
}
}