mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add OnSettingsReload
This commit is contained in:
parent
fc444fcbd6
commit
97248aad16
1 changed files with 24 additions and 2 deletions
|
|
@ -47,14 +47,36 @@ namespace MinecraftClient.ChatBots
|
||||||
if (!GetEntityHandlingEnabled())
|
if (!GetEntityHandlingEnabled())
|
||||||
{
|
{
|
||||||
LogToConsoleTranslated("extra.entity_required");
|
LogToConsoleTranslated("extra.entity_required");
|
||||||
LogToConsoleTranslated("general.bot_unload");
|
state = FishingState.WaitJoinGame;
|
||||||
UnloadBot();
|
|
||||||
}
|
}
|
||||||
inventoryEnabled = GetInventoryEnabled();
|
inventoryEnabled = GetInventoryEnabled();
|
||||||
if (!inventoryEnabled)
|
if (!inventoryEnabled)
|
||||||
LogToConsoleTranslated("bot.autoFish.no_inv_handle");
|
LogToConsoleTranslated("bot.autoFish.no_inv_handle");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update settings when reloaded
|
||||||
|
/// </summary>
|
||||||
|
public /* override */ void OnSettingsReload()
|
||||||
|
{
|
||||||
|
if (Settings.AutoFishing_Enabled)
|
||||||
|
{
|
||||||
|
if (!GetEntityHandlingEnabled())
|
||||||
|
{
|
||||||
|
LogToConsoleTranslated("extra.entity_required");
|
||||||
|
state = FishingState.WaitJoinGame;
|
||||||
|
}
|
||||||
|
inventoryEnabled = GetInventoryEnabled();
|
||||||
|
if (!inventoryEnabled)
|
||||||
|
LogToConsoleTranslated("bot.autoFish.no_inv_handle");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnloadBot();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void StartFishing()
|
private void StartFishing()
|
||||||
{
|
{
|
||||||
isFishing = false;
|
isFishing = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue