示例#1
0
 public ScoreboardObjective Remove()
 {
     var sb = new ScoreboardObjective();
     sb.Board = Board;
     sb.Mode = ScoreAction.Remove;
     return sb;
 }
示例#2
0
        public List<PacketFromServer> CreateFill()
        {
            var p = new List<PacketFromServer>();

            //Create
            var sb = new ScoreboardObjective();
            sb.Board = Board;
            sb.Mode = ScoreAction.Create;
            sb.Value = Title;
            sb.Type = "integer";
            p.Add(sb);

            //Fill
            foreach (var i in Items)
            {
                var u = new ScoreboardUpdate();
                u.Board = Board;
                u.Name = i.Name;
                u.Value = i.Score;
                p.Add(u);
            }

            //Show
            p.Add(new ScoreboardShow(Board, Position));
            return p;
        }