1
2 /**
3 IMPORTANT !!!
4
5 DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
6 THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7
8 IMPORTANT END !!!
9 */
10 package
11 cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
12 import java.util.*;
13 import javax.vecmath.*;
14 import cz.cuni.amis.pogamut.base.communication.messages.*;
15 import cz.cuni.amis.pogamut.base.communication.worldview.*;
16 import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17 import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18 import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19 import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20 import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22 import cz.cuni.amis.pogamut.udk.communication.messages.*;
23 import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24 import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25 import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26 import cz.cuni.amis.utils.exception.*;
27 import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28 import cz.cuni.amis.utils.SafeEquals;
29 import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30
31
32 /**
33
34 Asynchronous message. Message sent when a player leaves the
35 server.
36
37 Corresponding GameBots message is
38 LEFT.
39
40 */
41
42 public class
43 PlayerLeft
44 extends GBEvent
45
46 implements IWorldEvent, IWorldChangeEvent
47
48 {
49
50 /**
51 Creates new instance of command PlayerLeft.
52
53 Asynchronous message. Message sent when a player leaves the
54 server.
55 Corresponding GameBots message for this command is
56 .
57 @param Id Unique Id of the player who left.
58 @param Name The name of the player.
59 */
60 public PlayerLeft(
61 UnrealId Id, String Name) {
62
63 this.Id = Id;
64
65 this.Name = Name;
66
67 }
68
69
70 /** Example how the message looks like - used during parser tests. */
71 public static final String PROTOTYPE =
72 "LEFT {Id unreal_id} {Name text}";
73
74
75 /////// Properties BEGIN
76
77 /**
78 Unique Id of the player who left. */
79 protected
80 UnrealId Id =
81 null;
82
83
84 /**
85 Unique Id of the player who left. */
86 public
87 UnrealId getId() {
88 return
89 Id;
90 }
91
92
93
94 /**
95 The name of the player. */
96 protected
97 String Name =
98 null;
99
100
101 /**
102 The name of the player. */
103 public
104 String getName() {
105 return
106 Name;
107 }
108
109
110
111 /////// Properties END
112
113 /////// Extra Java code BEGIN
114
115 /////// Additional code from xslt BEGIN
116
117 public long getSimTime() {
118 // NOT IMPLEMENTED FOR UDK
119 return 0;
120 }
121
122
123
124 /////// Additional code from xslt END
125
126 /////// Extra Java from XML BEGIN
127
128 /////// Extra Java from XML END
129
130 /////// Extra Java code END
131
132
133
134 /**
135 * Cloning constructor.
136 */
137 public PlayerLeft(PlayerLeft original) {
138
139 this.Id=original.Id;
140
141 this.Name=original.Name;
142
143 }
144
145
146 /**
147 * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
148 */
149 public PlayerLeft() {
150 }
151
152
153
154 public String toString() {
155 return
156
157 super.toString() + " | " +
158
159 "Id = " +
160 String.valueOf(Id) + " | " +
161
162 "Name = " +
163 String.valueOf(Name) + " | " +
164 "";
165
166 }
167
168 public String toHtmlString() {
169 return super.toString() +
170
171 "<b>Id</b> : " +
172 String.valueOf(Id) +
173 " <br/> " +
174
175 "<b>Name</b> : " +
176 String.valueOf(Name) +
177 " <br/> " +
178 "";
179 }
180
181
182
183 }
184
185