mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Keep track of current game mode (#1053)
* GetGamemode() * GetGamemode() * ChangeGamemode() * GetGamemode() * Update ChatBot.cs code refractor * Update Inventory.cs Gamemode check added * Update Protocol18.cs * Update Protocol18.cs * Update Protocol18.cs code refractor * Update IMinecraftComHandler.cs code refractor * Update IMinecraftComHandler.cs * Update McTcpClient.cs fix * Update McTcpClient.cs fix * Fix duplicate gamemode event Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
This commit is contained in:
parent
27f35ee7a9
commit
87302bafab
4 changed files with 32 additions and 13 deletions
|
|
@ -42,10 +42,14 @@ namespace MinecraftClient.Commands
|
|||
ItemType itemType = ItemType.Stone;
|
||||
if (Enum.TryParse(args[2], out itemType))
|
||||
{
|
||||
int count = int.Parse(args[3]);
|
||||
if (handler.DoCreativeGive(slot, itemType, count))
|
||||
return "Requested " + itemType + " x" + count + " in slot #" + slot;
|
||||
else return "Failed to request Creative Give";
|
||||
if (handler.GetGamemode() == 1)
|
||||
{
|
||||
int count = int.Parse(args[3]);
|
||||
if (handler.DoCreativeGive(slot, itemType, count))
|
||||
return "Requested " + itemType + " x" + count + " in slot #" + slot;
|
||||
else return "Failed to request Creative Give";
|
||||
}
|
||||
else return "You need Gamemode Creative";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue