Exemplo n.º 1
0
        public void Handle(NetworkManager nm, Bot core)
        {
            if (!core.EnableCpe)
                core.RaiseErrorMessage("Protocol error: Received Holdthis while CPE Disabled.");

            if (!core.ClientSupportedExtensions.Contains(CPEExtensions.HeldBlock))
                core.RaiseErrorMessage("Protocol error: Received HoldThis, which client does not support.");

            core.HeldBlock = BlockToHold;
            core.CanChangeBlock = (PreventChange > 0);
            core.RaiseHeldBlockChange(BlockToHold, PreventChange);
        }