mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Enable/Disable TerrainAndMovements while logged in
Feature requested in #705
This commit is contained in:
parent
41b3f98924
commit
a6e660c974
8 changed files with 126 additions and 19 deletions
|
|
@ -579,13 +579,33 @@ namespace MinecraftClient
|
|||
Handler.BotLoad(new ChatBots.Script(filename, playername));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether Terrain and Movements is enabled.
|
||||
/// </summary>
|
||||
/// <returns>Enable status.</returns>
|
||||
public bool GetTerrainEnabled()
|
||||
{
|
||||
return Handler.GetTerrainEnabled();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable Terrain and Movements.
|
||||
/// Please note that Enabling will be deferred until next relog, respawn or world change.
|
||||
/// </summary>
|
||||
/// <param name="enabled">Enabled</param>
|
||||
/// <returns>TRUE if the setting was applied immediately, FALSE if delayed.</returns>
|
||||
public bool SetTerrainEnabled(bool enabled)
|
||||
{
|
||||
return Handler.SetTerrainEnabled(enabled);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current Minecraft World
|
||||
/// </summary>
|
||||
/// <returns>Minecraft world or null if associated setting is disabled</returns>
|
||||
protected Mapping.World GetWorld()
|
||||
{
|
||||
if (Settings.TerrainAndMovements)
|
||||
if (GetTerrainEnabled())
|
||||
return Handler.GetWorld();
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue