Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
UserJoinToServerRequest.cs
Go to the documentation of this file.
1using System;
2
4
5public abstract class UserJoinToServerRequest
6{
7 internal string UserDisplayName { get; private set; }
8
9 internal string UserFullIdentifier { get; private set; }
10
11 public event Action OnAccepted;
12
13 public event Action OnRejected;
14
15 public UserJoinToServerRequest(string userDisplayName, string fullIdentifier)
16 {
17 UserDisplayName = userDisplayName;
18 UserFullIdentifier = fullIdentifier;
19 }
20
21 public void Accept()
22 {
23 if (this.OnAccepted != null)
24 {
25 this.OnAccepted();
26 }
27 }
28
29 public void Reject()
30 {
31 if (this.OnRejected != null)
32 {
33 this.OnRejected();
34 }
35 }
36
37 public abstract bool IsValid();
38
39 public abstract string GetUserWrapperText();
40}
UserJoinToServerRequest(string userDisplayName, string fullIdentifier)