public void getUsers(object sender, EntityLoadEventArgs e) { // chat usernames foreach (HEntity entity in e) { players.Add(entity); } }
protected void RaiseOnEntityLoad(InterceptedEventArgs e) { if (EntityLoad != null) { var args = new EntityLoadEventArgs(e.Continuation, e.Step, e.Packet); OnEntityLoad(args); e.Cancel = args.Cancel; e.WasContinued = args.WasContinued; } }
protected virtual void OnEntityLoad(EntityLoadEventArgs e) { EventHandler<EntityLoadEventArgs> handler = EntityLoad; if (handler != null) handler(this, e); }