public override void Execute(FreneticScript.CommandSystem.CommandQueue queue, CommandEntry entry) { try { IntegerTag num = IntegerTag.TryFor(entry.GetArgumentObject(queue, 1)); if (num == null) { queue.HandleError(entry, "Invalid amount number!"); return; } PlayerTag player = PlayerTag.For(entry.GetArgument(queue, 0)); if (player == null) { queue.HandleError(entry, "Invalid player!"); return; } int amount = (int)num.Internal; PlayerLife life = player.Internal.player.life; if (amount >= 0) { life.askRest((byte)amount); } else { life.askTire((byte)-amount); } if (entry.ShouldShowGood(queue)) { entry.Good(queue, "Successfully adjusted the stamina level of a player!"); } } catch (Exception ex) // TODO: Necessity? { queue.HandleError(entry, "Failed to adjust player's stamina level: " + ex.ToString()); } }