View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2    		
3    		// --- IMPORTS FROM /messages/settings/javasettings/javaimport BEGIN
4   			import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
5   		// --- IMPORTS FROM /messages/settings/javasettings/javaimport END
6   		
7   		
8   		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] BEGIN
9   				
10  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] END
11  		
12  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=base]+classtype[@name=message] BEGIN
13  		
14  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=base]+classtype[@name=message] END
15      
16   		/**
17           *  
18               				Implementation of the GameBots2004 message PLR contains also its Local/Shared/Static subpart class definitions..  
19              			
20           *
21           *  <p></p><p></p>
22           *  Complete message documentation:               
23           *  
24  		Synchronous message. Contains information about other players in
25  		the game, like their current velocity, position, weapon and
26  		reachability. Only reports those players that are visible.
27  		(within field of view and not occluded).
28  	
29           */
30   	public class PlayerMessage   
31    				extends 
32    				Player
33    						implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent
34    						
35  	    {
36   	
37      	
38      	
39      	/**
40      	 * Parameter-less contructor for the message.
41      	 */
42  		public PlayerMessage()
43  		{
44  		}
45  	
46      	
47      	
48      	
49      	/**
50  		 * Creates new instance of the message Player.
51  		 * 
52  		Synchronous message. Contains information about other players in
53  		the game, like their current velocity, position, weapon and
54  		reachability. Only reports those players that are visible.
55  		(within field of view and not occluded).
56  	
57  		 * Corresponding GameBots message
58  		 *   
59  		 *   is
60  		 *   PLR.
61  		 * 
62   	  	 * 
63  		 *   
64  		 *     @param Id Unique Id of the player.
65  		 *   
66  		 * 
67  		 *   
68  		 *     @param Jmx 
69  			Exported just for control server. Holds jmx address we need to connect to
70              when we want to debug our bot.
71  		
72  		 *   
73  		 * 
74  		 *   
75  		 *     @param Name 
76  			Human readable name of the player.
77  		
78  		 *   
79  		 * 
80  		 *   
81  		 *     @param Spectator 
82  			Whether this player is in SPECTATE mode. Humans can change the mode during runtime!
83  		
84  		 *   
85  		 * 
86  		 *   
87  		 *     @param Action 
88  			Atomic action this bot is doing (BDI).
89  		
90  		 *   
91  		 * 
92  		 *   
93  		 *     @param Visible 
94              If the player is in the field of view of the bot.
95          
96  		 *   
97  		 * 
98  		 *   
99  		 *     @param Rotation 
100 			Which direction the player is facing in absolute terms.
101 		
102 		 *   
103 		 * 
104 		 *   
105 		 *     @param Location 
106 			An absolute location of the player within the map.
107 		
108 		 *   
109 		 * 
110 		 *   
111 		 *     @param Velocity 
112 			Absolute velocity of the player as a vector of movement per one
113 			game second.
114 		
115 		 *   
116 		 * 
117 		 *   
118 		 *     @param Team 
119 			What team the player is on. 255 is no team. 0-3 are red,
120 			blue, green, gold in that order.
121 		
122 		 *   
123 		 * 
124 		 *   
125 		 *     @param Weapon 
126 			Class of the weapon the player is holding. Weapon strings to
127 			look for include: "AssaultRifle", "ShieldGun", "FlakCannon",
128 			"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
129 			"RocketLauncher", "Minigun", "LightingGun", "Translocator".
130 			TODO: Look if this is all.
131 		
132 		 *   
133 		 * 
134 		 *   
135 		 *     @param Crouched 
136 			True if the bot is crouched.
137 		
138 		 *   
139 		 * 
140 		 *   
141 		 *     @param Firing 
142 			0 means is not firing, 1 - firing in primary mode, 2 -
143 			firing in secondary mode (alt firing).
144 		
145 		 *   
146 		 * 
147 		 *   
148 		 *     @param EmotLeft 
149 			For UE2. Holds left emoticon of the bot, "None" means none set.
150 		
151 		 *   
152 		 * 
153 		 *   
154 		 *     @param EmotCenter 
155 			For UE2. Holds center emoticon of the bot, "None" means none set.
156 		
157 		 *   
158 		 * 
159 		 *   
160 		 *     @param EmotRight 
161 			For UE2. Holds right emoticon of the bot, "None" means none set.
162 		
163 		 *   
164 		 * 
165 		 *   
166 		 *     @param Bubble 
167 			For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
168 		
169 		 *   
170 		 * 
171 		 *   
172 		 *     @param Anim 
173 			For UE2. Current played animation of the bot.
174 		
175 		 *   
176 		 * 
177 		 */
178 		public PlayerMessage(
179 			UnrealId Id,  String Jmx,  String Name,  Boolean Spectator,  String Action,  boolean Visible,  Rotation Rotation,  Location Location,  Velocity Velocity,  int Team,  String Weapon,  boolean Crouched,  int Firing,  String EmotLeft,  String EmotCenter,  String EmotRight,  String Bubble,  String Anim
180 		) {
181 			
182 					this.Id = Id;
183 				
184 					this.Jmx = Jmx;
185 				
186 					this.Name = Name;
187 				
188 					this.Spectator = Spectator;
189 				
190 					this.Action = Action;
191 				
192 					this.Visible = Visible;
193 				
194 					this.Rotation = Rotation;
195 				
196 					this.Location = Location;
197 				
198 					this.Velocity = Velocity;
199 				
200 					this.Team = Team;
201 				
202 					this.Weapon = Weapon;
203 				
204 					this.Crouched = Crouched;
205 				
206 					this.Firing = Firing;
207 				
208 					this.EmotLeft = EmotLeft;
209 				
210 					this.EmotCenter = EmotCenter;
211 				
212 					this.EmotRight = EmotRight;
213 				
214 					this.Bubble = Bubble;
215 				
216 					this.Anim = Anim;
217 				
218 		}
219     
220 		/**
221 		 * Cloning constructor from the full message.
222 		 *
223 		 * @param original
224 		 */
225 		public PlayerMessage(PlayerMessage original) {		
226 			
227 					this.Id = original.getId()
228  	;
229 				
230 					this.Jmx = original.getJmx()
231  	;
232 				
233 					this.Name = original.getName()
234  	;
235 				
236 					this.Spectator = original.isSpectator()
237  	;
238 				
239 					this.Action = original.getAction()
240  	;
241 				
242 					this.Visible = original.isVisible()
243  	;
244 				
245 					this.Rotation = original.getRotation()
246  	;
247 				
248 					this.Location = original.getLocation()
249  	;
250 				
251 					this.Velocity = original.getVelocity()
252  	;
253 				
254 					this.Team = original.getTeam()
255  	;
256 				
257 					this.Weapon = original.getWeapon()
258  	;
259 				
260 					this.Crouched = original.isCrouched()
261  	;
262 				
263 					this.Firing = original.getFiring()
264  	;
265 				
266 					this.EmotLeft = original.getEmotLeft()
267  	;
268 				
269 					this.EmotCenter = original.getEmotCenter()
270  	;
271 				
272 					this.EmotRight = original.getEmotRight()
273  	;
274 				
275 					this.Bubble = original.getBubble()
276  	;
277 				
278 					this.Anim = original.getAnim()
279  	;
280 				
281 				this.TeamId = original.getTeamId();
282 			
283 			this.SimTime = original.getSimTime();
284 		}
285 		
286     				
287     					protected ITeamId TeamId;
288     					
289     					/**
290     					 * Used by Yylex to slip corretn TeamId.
291     					 */
292     					protected void setTeamId(ITeamId TeamId) {
293     					    this.TeamId = TeamId;
294     					}
295     				
296     					public ITeamId getTeamId() {
297 							return TeamId;
298 						}
299     	
300     					
301     					
302     	
303 	    /**
304          * Unique Id of the player. 
305          */
306         protected
307          UnrealId Id =
308        	null;
309 	
310     						
311     						/**
312 		 					 * Whether property 'Id' was received from GB2004.
313 		 					 */
314 							protected boolean Id_Set = false;
315 							
316     						@Override
317 		    				
318  		/**
319          * Unique Id of the player. 
320          */
321         public  UnrealId getId()
322  	 {
323 		    					return Id;
324 		    				}
325 		    			
326     	
327 	    /**
328          * 
329 			Exported just for control server. Holds jmx address we need to connect to
330             when we want to debug our bot.
331 		 
332          */
333         protected
334          String Jmx =
335        	null;
336 	
337     						
338     						/**
339 		 					 * Whether property 'Jmx' was received from GB2004.
340 		 					 */
341 							protected boolean Jmx_Set = false;
342 							
343     						@Override
344 		    				
345  		/**
346          * 
347 			Exported just for control server. Holds jmx address we need to connect to
348             when we want to debug our bot.
349 		 
350          */
351         public  String getJmx()
352  	 {
353 		    					return Jmx;
354 		    				}
355 		    			
356     	
357 	    /**
358          * 
359 			Human readable name of the player.
360 		 
361          */
362         protected
363          String Name =
364        	null;
365 	
366     						
367     						/**
368 		 					 * Whether property 'Name' was received from GB2004.
369 		 					 */
370 							protected boolean Name_Set = false;
371 							
372     						@Override
373 		    				
374  		/**
375          * 
376 			Human readable name of the player.
377 		 
378          */
379         public  String getName()
380  	 {
381 		    					return Name;
382 		    				}
383 		    			
384     	
385 	    /**
386          * 
387 			Whether this player is in SPECTATE mode. Humans can change the mode during runtime!
388 		 
389          */
390         protected
391          Boolean Spectator =
392        	false;
393 	
394     						
395     						/**
396 		 					 * Whether property 'Spectator' was received from GB2004.
397 		 					 */
398 							protected boolean Spectator_Set = false;
399 							
400     						@Override
401 		    				
402  		/**
403          * 
404 			Whether this player is in SPECTATE mode. Humans can change the mode during runtime!
405 		 
406          */
407         public  Boolean isSpectator()
408  	 {
409 		    					return Spectator;
410 		    				}
411 		    			
412     	
413 	    /**
414          * 
415 			Atomic action this bot is doing (BDI).
416 		 
417          */
418         protected
419          String Action =
420        	null;
421 	
422     						
423     						/**
424 		 					 * Whether property 'Action' was received from GB2004.
425 		 					 */
426 							protected boolean Action_Set = false;
427 							
428     						@Override
429 		    				
430  		/**
431          * 
432 			Atomic action this bot is doing (BDI).
433 		 
434          */
435         public  String getAction()
436  	 {
437 		    					return Action;
438 		    				}
439 		    			
440     	
441 	    /**
442          * 
443             If the player is in the field of view of the bot.
444          
445          */
446         protected
447          boolean Visible =
448        	true;
449 	
450     						
451     						/**
452 		 					 * Whether property 'Visible' was received from GB2004.
453 		 					 */
454 							protected boolean Visible_Set = false;
455 							
456     						@Override
457 		    				
458  		/**
459          * 
460             If the player is in the field of view of the bot.
461          
462          */
463         public  boolean isVisible()
464  	 {
465 		    					return Visible;
466 		    				}
467 		    			
468     	
469 	    /**
470          * 
471 			Which direction the player is facing in absolute terms.
472 		 
473          */
474         protected
475          Rotation Rotation =
476        	null;
477 	
478     						
479     						/**
480 		 					 * Whether property 'Rotation' was received from GB2004.
481 		 					 */
482 							protected boolean Rotation_Set = false;
483 							
484     						@Override
485 		    				
486  		/**
487          * 
488 			Which direction the player is facing in absolute terms.
489 		 
490          */
491         public  Rotation getRotation()
492  	 {
493 		    					return Rotation;
494 		    				}
495 		    			
496     	
497 	    /**
498          * 
499 			An absolute location of the player within the map.
500 		 
501          */
502         protected
503          Location Location =
504        	null;
505 	
506     						
507     						/**
508 		 					 * Whether property 'Location' was received from GB2004.
509 		 					 */
510 							protected boolean Location_Set = false;
511 							
512     						@Override
513 		    				
514  		/**
515          * 
516 			An absolute location of the player within the map.
517 		 
518          */
519         public  Location getLocation()
520  	 {
521 		    					return Location;
522 		    				}
523 		    			
524     	
525 	    /**
526          * 
527 			Absolute velocity of the player as a vector of movement per one
528 			game second.
529 		 
530          */
531         protected
532          Velocity Velocity =
533        	null;
534 	
535     						
536     						/**
537 		 					 * Whether property 'Velocity' was received from GB2004.
538 		 					 */
539 							protected boolean Velocity_Set = false;
540 							
541     						@Override
542 		    				
543  		/**
544          * 
545 			Absolute velocity of the player as a vector of movement per one
546 			game second.
547 		 
548          */
549         public  Velocity getVelocity()
550  	 {
551 		    					return Velocity;
552 		    				}
553 		    			
554     	
555 	    /**
556          * 
557 			What team the player is on. 255 is no team. 0-3 are red,
558 			blue, green, gold in that order.
559 		 
560          */
561         protected
562          int Team =
563        	0;
564 	
565     						
566     						/**
567 		 					 * Whether property 'Team' was received from GB2004.
568 		 					 */
569 							protected boolean Team_Set = false;
570 							
571     						@Override
572 		    				
573  		/**
574          * 
575 			What team the player is on. 255 is no team. 0-3 are red,
576 			blue, green, gold in that order.
577 		 
578          */
579         public  int getTeam()
580  	 {
581 		    					return Team;
582 		    				}
583 		    			
584     	
585 	    /**
586          * 
587 			Class of the weapon the player is holding. Weapon strings to
588 			look for include: "AssaultRifle", "ShieldGun", "FlakCannon",
589 			"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
590 			"RocketLauncher", "Minigun", "LightingGun", "Translocator".
591 			TODO: Look if this is all.
592 		 
593          */
594         protected
595          String Weapon =
596        	null;
597 	
598     						
599     						/**
600 		 					 * Whether property 'Weapon' was received from GB2004.
601 		 					 */
602 							protected boolean Weapon_Set = false;
603 							
604     						@Override
605 		    				
606  		/**
607          * 
608 			Class of the weapon the player is holding. Weapon strings to
609 			look for include: "AssaultRifle", "ShieldGun", "FlakCannon",
610 			"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
611 			"RocketLauncher", "Minigun", "LightingGun", "Translocator".
612 			TODO: Look if this is all.
613 		 
614          */
615         public  String getWeapon()
616  	 {
617 		    					return Weapon;
618 		    				}
619 		    			
620     	
621 	    /**
622          * 
623 			True if the bot is crouched.
624 		 
625          */
626         protected
627          boolean Crouched =
628        	false;
629 	
630     						
631     						/**
632 		 					 * Whether property 'Crouched' was received from GB2004.
633 		 					 */
634 							protected boolean Crouched_Set = false;
635 							
636     						@Override
637 		    				
638  		/**
639          * 
640 			True if the bot is crouched.
641 		 
642          */
643         public  boolean isCrouched()
644  	 {
645 		    					return Crouched;
646 		    				}
647 		    			
648     	
649 	    /**
650          * 
651 			0 means is not firing, 1 - firing in primary mode, 2 -
652 			firing in secondary mode (alt firing).
653 		 
654          */
655         protected
656          int Firing =
657        	0;
658 	
659     						
660     						/**
661 		 					 * Whether property 'Firing' was received from GB2004.
662 		 					 */
663 							protected boolean Firing_Set = false;
664 							
665     						@Override
666 		    				
667  		/**
668          * 
669 			0 means is not firing, 1 - firing in primary mode, 2 -
670 			firing in secondary mode (alt firing).
671 		 
672          */
673         public  int getFiring()
674  	 {
675 		    					return Firing;
676 		    				}
677 		    			
678     	
679 	    /**
680          * 
681 			For UE2. Holds left emoticon of the bot, "None" means none set.
682 		 
683          */
684         protected
685          String EmotLeft =
686        	null;
687 	
688     						
689     						/**
690 		 					 * Whether property 'EmotLeft' was received from GB2004.
691 		 					 */
692 							protected boolean EmotLeft_Set = false;
693 							
694     						@Override
695 		    				
696  		/**
697          * 
698 			For UE2. Holds left emoticon of the bot, "None" means none set.
699 		 
700          */
701         public  String getEmotLeft()
702  	 {
703 		    					return EmotLeft;
704 		    				}
705 		    			
706     	
707 	    /**
708          * 
709 			For UE2. Holds center emoticon of the bot, "None" means none set.
710 		 
711          */
712         protected
713          String EmotCenter =
714        	null;
715 	
716     						
717     						/**
718 		 					 * Whether property 'EmotCenter' was received from GB2004.
719 		 					 */
720 							protected boolean EmotCenter_Set = false;
721 							
722     						@Override
723 		    				
724  		/**
725          * 
726 			For UE2. Holds center emoticon of the bot, "None" means none set.
727 		 
728          */
729         public  String getEmotCenter()
730  	 {
731 		    					return EmotCenter;
732 		    				}
733 		    			
734     	
735 	    /**
736          * 
737 			For UE2. Holds right emoticon of the bot, "None" means none set.
738 		 
739          */
740         protected
741          String EmotRight =
742        	null;
743 	
744     						
745     						/**
746 		 					 * Whether property 'EmotRight' was received from GB2004.
747 		 					 */
748 							protected boolean EmotRight_Set = false;
749 							
750     						@Override
751 		    				
752  		/**
753          * 
754 			For UE2. Holds right emoticon of the bot, "None" means none set.
755 		 
756          */
757         public  String getEmotRight()
758  	 {
759 		    					return EmotRight;
760 		    				}
761 		    			
762     	
763 	    /**
764          * 
765 			For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
766 		 
767          */
768         protected
769          String Bubble =
770        	null;
771 	
772     						
773     						/**
774 		 					 * Whether property 'Bubble' was received from GB2004.
775 		 					 */
776 							protected boolean Bubble_Set = false;
777 							
778     						@Override
779 		    				
780  		/**
781          * 
782 			For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
783 		 
784          */
785         public  String getBubble()
786  	 {
787 		    					return Bubble;
788 		    				}
789 		    			
790     	
791 	    /**
792          * 
793 			For UE2. Current played animation of the bot.
794 		 
795          */
796         protected
797          String Anim =
798        	null;
799 	
800     						
801     						/**
802 		 					 * Whether property 'Anim' was received from GB2004.
803 		 					 */
804 							protected boolean Anim_Set = false;
805 							
806     						@Override
807 		    				
808  		/**
809          * 
810 			For UE2. Current played animation of the bot.
811 		 
812          */
813         public  String getAnim()
814  	 {
815 		    					return Anim;
816 		    				}
817 		    			
818 		    			
819 		    			private PlayerLocal localPart = null;
820 		    			
821 		    			@Override
822 						public PlayerLocal 
823 						getLocal() {
824 							if (localPart != null) return localPart;
825 							return localPart = new 
826 								PlayerLocalMessage();
827 						}
828 					
829 						private PlayerShared sharedPart = null;
830 					
831 						@Override
832 						public PlayerShared 
833 						getShared() {
834 							if (sharedPart != null) return sharedPart;							
835 							return sharedPart = new 
836 								PlayerSharedMessage();
837 						}
838 					
839 						private PlayerStatic staticPart = null; 
840 					
841 						@Override
842 						public PlayerStatic 
843 						getStatic() {
844 							if (staticPart != null) return staticPart;
845 							return staticPart = new 
846 								PlayerStaticMessage();
847 						}
848     				
849  		/**
850          *  
851             				Implementation of the local part of the GameBots2004 message PLR, used
852             				to facade PLRMessage.  
853             			
854          *
855          *  <p></p><p></p>
856          *  Complete message documentation:               
857          *  
858 		Synchronous message. Contains information about other players in
859 		the game, like their current velocity, position, weapon and
860 		reachability. Only reports those players that are visible.
861 		(within field of view and not occluded).
862 	
863          */
864  	public class PlayerLocalMessage 
865 	  					extends
866   						PlayerLocal
867 	    {
868  	
869 		    			@Override
870 		    			public 
871 		    			PlayerLocalMessage clone() {
872 		    				return this;
873 		    			}
874 		    			
875 		    				public PlayerLocalMessage getLocal() {
876 								return this;
877 					    	}
878 							public ISharedWorldObject getShared() {
879 							 	throw new UnsupportedOperationException("Could not return LOCAL as SHARED");
880 							}
881 							public IStaticWorldObject getStatic() {
882 							    throw new UnsupportedOperationException("Could not return LOCAL as STATIC");
883 							}
884 		    			
885  		/**
886          * Unique Id of the player. 
887          */
888         public  UnrealId getId()
889  	 {
890 				    					return Id;
891 				    				}
892 				    			
893  		/**
894          * 
895 			Exported just for control server. Holds jmx address we need to connect to
896             when we want to debug our bot.
897 		 
898          */
899         public  String getJmx()
900  	 {
901 				    					return Jmx;
902 				    				}
903 				    			
904  		/**
905          * 
906             If the player is in the field of view of the bot.
907          
908          */
909         public  boolean isVisible()
910  	 {
911 				    					return Visible;
912 				    				}
913 				    			
914  		
915  	    public String toString() {
916             return
917             	super.toString() + "[" +
918             	
919 		              			"Id = " + String.valueOf(getId()
920  	) + " | " + 
921 		              		
922 		              			"Jmx = " + String.valueOf(getJmx()
923  	) + " | " + 
924 		              		
925 		              			"Visible = " + String.valueOf(isVisible()
926  	) + " | " + 
927 		              		
928 				"]";           		
929         }
930  	
931  		
932  		public String toHtmlString() {
933  			return super.toString() + "[<br/>" +
934             	
935 		              			"<b>Id</b> = " + String.valueOf(getId()
936  	) + " <br/> " + 
937 		              		
938 		              			"<b>Jmx</b> = " + String.valueOf(getJmx()
939  	) + " <br/> " + 
940 		              		
941 		              			"<b>Visible</b> = " + String.valueOf(isVisible()
942  	) + " <br/> " + 
943 		              		
944 				"<br/>]";     
945 		}
946  	
947  		
948  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
949         	
950 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
951 		
952 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=local+classtype[@name=message]) ---
953 	        
954 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=local+classtype[@name=message]) ---        	            	
955  	
956 		}
957  	
958  		/**
959          *  
960             				Implementation of the static part of the GameBots2004 message PLR, used
961             				to facade PLRMessage.  
962             			
963          *
964          *  <p></p><p></p>
965          *  Complete message documentation:               
966          *  
967 		Synchronous message. Contains information about other players in
968 		the game, like their current velocity, position, weapon and
969 		reachability. Only reports those players that are visible.
970 		(within field of view and not occluded).
971 	
972          */
973  	public class PlayerStaticMessage 
974 	  					extends
975   						PlayerStatic
976 	    {
977  	
978 		    			@Override
979 		    			public 
980 		    			PlayerStaticMessage clone() {
981 		    				return this;
982 		    			}
983 		    			
984  		/**
985          * Unique Id of the player. 
986          */
987         public  UnrealId getId()
988  	 {
989 				    					return Id;
990 				    				}
991 				    			
992  		
993  		@Override
994  		public boolean isDifferentFrom(IStaticWorldObject other)
995  		{
996  			if (other == null) //early fail
997  			{
998  				return true;
999  			}
1000  			else if (other == this) //early out
1001  			{
1002  				return false;
1003  			}
1004  			else
1005  			{
1006  				PlayerStatic obj = (PlayerStatic) other;
1007 
1008  				
1009  						if ( !(
1010  	 			AdvancedEquals.equalsOrNull(this.getId()
1011  	, obj.getId()
1012  	)
1013  	 		) )
1014 						{
1015 							System.out.println("!!!!!PROPERTY UPDATE ERROR!!!! on property Id on object class PlayerStatic");
1016 							return true;
1017 						}
1018  					
1019  			}
1020  			return false;
1021  		}
1022  	 
1023  		
1024  	    public String toString() {
1025             return
1026             	super.toString() + "[" +
1027             	
1028 		              			"Id = " + String.valueOf(getId()
1029  	) + " | " + 
1030 		              		
1031 				"]";           		
1032         }
1033  	
1034  		
1035  		public String toHtmlString() {
1036  			return super.toString() + "[<br/>" +
1037             	
1038 		              			"<b>Id</b> = " + String.valueOf(getId()
1039  	) + " <br/> " + 
1040 		              		
1041 				"<br/>]";     
1042 		}
1043  	
1044  		
1045  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
1046         	
1047 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
1048 		
1049 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=static+classtype[@name=message]) ---
1050 	        
1051 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=static+classtype[@name=message]) ---        	            	
1052  	
1053 		}
1054  	
1055  		/**
1056          *  
1057             				Implementation of the shared part of the GameBots2004 message PLR, used
1058             				to facade PLRMessage.  
1059             			
1060          *
1061          *  <p></p><p></p>
1062          *  Complete message documentation:               
1063          *  
1064 		Synchronous message. Contains information about other players in
1065 		the game, like their current velocity, position, weapon and
1066 		reachability. Only reports those players that are visible.
1067 		(within field of view and not occluded).
1068 	
1069          */
1070  	public class PlayerSharedMessage 
1071 	  					extends
1072   						PlayerShared
1073 	    {
1074  	
1075     	
1076     	
1077 		public PlayerSharedMessage()
1078 		{
1079 			
1080 				propertyMap.put(myName.getPropertyId(), myName);
1081 			
1082 				propertyMap.put(mySpectator.getPropertyId(), mySpectator);
1083 			
1084 				propertyMap.put(myAction.getPropertyId(), myAction);
1085 			
1086 				propertyMap.put(myRotation.getPropertyId(), myRotation);
1087 			
1088 				propertyMap.put(myLocation.getPropertyId(), myLocation);
1089 			
1090 				propertyMap.put(myVelocity.getPropertyId(), myVelocity);
1091 			
1092 				propertyMap.put(myTeam.getPropertyId(), myTeam);
1093 			
1094 				propertyMap.put(myWeapon.getPropertyId(), myWeapon);
1095 			
1096 				propertyMap.put(myCrouched.getPropertyId(), myCrouched);
1097 			
1098 				propertyMap.put(myFiring.getPropertyId(), myFiring);
1099 			
1100 				propertyMap.put(myEmotLeft.getPropertyId(), myEmotLeft);
1101 			
1102 				propertyMap.put(myEmotCenter.getPropertyId(), myEmotCenter);
1103 			
1104 				propertyMap.put(myEmotRight.getPropertyId(), myEmotRight);
1105 			
1106 				propertyMap.put(myBubble.getPropertyId(), myBubble);
1107 			
1108 				propertyMap.put(myAnim.getPropertyId(), myAnim);
1109 			
1110 		}		
1111     
1112 		    			@Override
1113 		    			public 
1114 		    			PlayerSharedMessage clone() {
1115 		    				return this;
1116 		    			}
1117 		    			
1118 		
1119 		
1120 		
1121 		protected HashMap<PropertyId, ISharedProperty> propertyMap = new HashMap<PropertyId, ISharedProperty>(
1122 			15
1123 		);
1124 		
1125 		@Override
1126 		public ISharedProperty getProperty(PropertyId id) {
1127 			return propertyMap.get(id);
1128 		}
1129 
1130 		@Override
1131 		public Map<PropertyId, ISharedProperty> getProperties() {
1132 			return propertyMap;
1133 		}
1134 	
1135 		
1136 		
1137  		/**
1138          * Unique Id of the player. 
1139          */
1140         public  UnrealId getId()
1141  	 {
1142   			return Id;
1143   		}
1144   		
1145     	
1146 	    /**
1147          * 
1148 			Human readable name of the player.
1149 		 
1150          */
1151         protected
1152          StringProperty 
1153         myName
1154 					= new
1155 					StringProperty
1156 					(
1157 						getId(), 
1158 						"Name", 
1159 						Name, 
1160 						Player.class
1161 					);
1162 					
1163  		/**
1164          * 
1165 			Human readable name of the player.
1166 		 
1167          */
1168         public  String getName()
1169  	 {
1170 			  			return myName.getValue();
1171 			  		}
1172 				
1173     	
1174 	    /**
1175          * 
1176 			Whether this player is in SPECTATE mode. Humans can change the mode during runtime!
1177 		 
1178          */
1179         protected
1180          BooleanProperty 
1181         mySpectator
1182 					= new
1183 					BooleanProperty
1184 					(
1185 						getId(), 
1186 						"Spectator", 
1187 						Spectator, 
1188 						Player.class
1189 					);
1190 					
1191  		/**
1192          * 
1193 			Whether this player is in SPECTATE mode. Humans can change the mode during runtime!
1194 		 
1195          */
1196         public  Boolean isSpectator()
1197  	 {
1198 			  			return mySpectator.getValue();
1199 			  		}
1200 				
1201     	
1202 	    /**
1203          * 
1204 			Atomic action this bot is doing (BDI).
1205 		 
1206          */
1207         protected
1208          StringProperty 
1209         myAction
1210 					= new
1211 					StringProperty
1212 					(
1213 						getId(), 
1214 						"Action", 
1215 						Action, 
1216 						Player.class
1217 					);
1218 					
1219  		/**
1220          * 
1221 			Atomic action this bot is doing (BDI).
1222 		 
1223          */
1224         public  String getAction()
1225  	 {
1226 			  			return myAction.getValue();
1227 			  		}
1228 				
1229     	
1230 	    /**
1231          * 
1232 			Which direction the player is facing in absolute terms.
1233 		 
1234          */
1235         protected
1236          RotationProperty 
1237         myRotation
1238 					= new
1239 					RotationProperty
1240 					(
1241 						getId(), 
1242 						"Rotation", 
1243 						Rotation, 
1244 						Player.class
1245 					);
1246 					
1247  		/**
1248          * 
1249 			Which direction the player is facing in absolute terms.
1250 		 
1251          */
1252         public  Rotation getRotation()
1253  	 {
1254 			  			return myRotation.getValue();
1255 			  		}
1256 				
1257     	
1258 	    /**
1259          * 
1260 			An absolute location of the player within the map.
1261 		 
1262          */
1263         protected
1264          LocationProperty 
1265         myLocation
1266 					= new
1267 					LocationProperty
1268 					(
1269 						getId(), 
1270 						"Location", 
1271 						Location, 
1272 						Player.class
1273 					);
1274 					
1275  		/**
1276          * 
1277 			An absolute location of the player within the map.
1278 		 
1279          */
1280         public  Location getLocation()
1281  	 {
1282 			  			return myLocation.getValue();
1283 			  		}
1284 				
1285     	
1286 	    /**
1287          * 
1288 			Absolute velocity of the player as a vector of movement per one
1289 			game second.
1290 		 
1291          */
1292         protected
1293          VelocityProperty 
1294         myVelocity
1295 					= new
1296 					VelocityProperty
1297 					(
1298 						getId(), 
1299 						"Velocity", 
1300 						Velocity, 
1301 						Player.class
1302 					);
1303 					
1304  		/**
1305          * 
1306 			Absolute velocity of the player as a vector of movement per one
1307 			game second.
1308 		 
1309          */
1310         public  Velocity getVelocity()
1311  	 {
1312 			  			return myVelocity.getValue();
1313 			  		}
1314 				
1315     	
1316 	    /**
1317          * 
1318 			What team the player is on. 255 is no team. 0-3 are red,
1319 			blue, green, gold in that order.
1320 		 
1321          */
1322         protected
1323          IntProperty 
1324         myTeam
1325 					= new
1326 					IntProperty
1327 					(
1328 						getId(), 
1329 						"Team", 
1330 						Team, 
1331 						Player.class
1332 					);
1333 					
1334  		/**
1335          * 
1336 			What team the player is on. 255 is no team. 0-3 are red,
1337 			blue, green, gold in that order.
1338 		 
1339          */
1340         public  int getTeam()
1341  	 {
1342 			  			return myTeam.getValue();
1343 			  		}
1344 				
1345     	
1346 	    /**
1347          * 
1348 			Class of the weapon the player is holding. Weapon strings to
1349 			look for include: "AssaultRifle", "ShieldGun", "FlakCannon",
1350 			"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
1351 			"RocketLauncher", "Minigun", "LightingGun", "Translocator".
1352 			TODO: Look if this is all.
1353 		 
1354          */
1355         protected
1356          StringProperty 
1357         myWeapon
1358 					= new
1359 					StringProperty
1360 					(
1361 						getId(), 
1362 						"Weapon", 
1363 						Weapon, 
1364 						Player.class
1365 					);
1366 					
1367  		/**
1368          * 
1369 			Class of the weapon the player is holding. Weapon strings to
1370 			look for include: "AssaultRifle", "ShieldGun", "FlakCannon",
1371 			"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
1372 			"RocketLauncher", "Minigun", "LightingGun", "Translocator".
1373 			TODO: Look if this is all.
1374 		 
1375          */
1376         public  String getWeapon()
1377  	 {
1378 			  			return myWeapon.getValue();
1379 			  		}
1380 				
1381     	
1382 	    /**
1383          * 
1384 			True if the bot is crouched.
1385 		 
1386          */
1387         protected
1388          BooleanProperty 
1389         myCrouched
1390 					= new
1391 					BooleanProperty
1392 					(
1393 						getId(), 
1394 						"Crouched", 
1395 						Crouched, 
1396 						Player.class
1397 					);
1398 					
1399  		/**
1400          * 
1401 			True if the bot is crouched.
1402 		 
1403          */
1404         public  boolean isCrouched()
1405  	 {
1406 			  			return myCrouched.getValue();
1407 			  		}
1408 				
1409     	
1410 	    /**
1411          * 
1412 			0 means is not firing, 1 - firing in primary mode, 2 -
1413 			firing in secondary mode (alt firing).
1414 		 
1415          */
1416         protected
1417          IntProperty 
1418         myFiring
1419 					= new
1420 					IntProperty
1421 					(
1422 						getId(), 
1423 						"Firing", 
1424 						Firing, 
1425 						Player.class
1426 					);
1427 					
1428  		/**
1429          * 
1430 			0 means is not firing, 1 - firing in primary mode, 2 -
1431 			firing in secondary mode (alt firing).
1432 		 
1433          */
1434         public  int getFiring()
1435  	 {
1436 			  			return myFiring.getValue();
1437 			  		}
1438 				
1439     	
1440 	    /**
1441          * 
1442 			For UE2. Holds left emoticon of the bot, "None" means none set.
1443 		 
1444          */
1445         protected
1446          StringProperty 
1447         myEmotLeft
1448 					= new
1449 					StringProperty
1450 					(
1451 						getId(), 
1452 						"EmotLeft", 
1453 						EmotLeft, 
1454 						Player.class
1455 					);
1456 					
1457  		/**
1458          * 
1459 			For UE2. Holds left emoticon of the bot, "None" means none set.
1460 		 
1461          */
1462         public  String getEmotLeft()
1463  	 {
1464 			  			return myEmotLeft.getValue();
1465 			  		}
1466 				
1467     	
1468 	    /**
1469          * 
1470 			For UE2. Holds center emoticon of the bot, "None" means none set.
1471 		 
1472          */
1473         protected
1474          StringProperty 
1475         myEmotCenter
1476 					= new
1477 					StringProperty
1478 					(
1479 						getId(), 
1480 						"EmotCenter", 
1481 						EmotCenter, 
1482 						Player.class
1483 					);
1484 					
1485  		/**
1486          * 
1487 			For UE2. Holds center emoticon of the bot, "None" means none set.
1488 		 
1489          */
1490         public  String getEmotCenter()
1491  	 {
1492 			  			return myEmotCenter.getValue();
1493 			  		}
1494 				
1495     	
1496 	    /**
1497          * 
1498 			For UE2. Holds right emoticon of the bot, "None" means none set.
1499 		 
1500          */
1501         protected
1502          StringProperty 
1503         myEmotRight
1504 					= new
1505 					StringProperty
1506 					(
1507 						getId(), 
1508 						"EmotRight", 
1509 						EmotRight, 
1510 						Player.class
1511 					);
1512 					
1513  		/**
1514          * 
1515 			For UE2. Holds right emoticon of the bot, "None" means none set.
1516 		 
1517          */
1518         public  String getEmotRight()
1519  	 {
1520 			  			return myEmotRight.getValue();
1521 			  		}
1522 				
1523     	
1524 	    /**
1525          * 
1526 			For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
1527 		 
1528          */
1529         protected
1530          StringProperty 
1531         myBubble
1532 					= new
1533 					StringProperty
1534 					(
1535 						getId(), 
1536 						"Bubble", 
1537 						Bubble, 
1538 						Player.class
1539 					);
1540 					
1541  		/**
1542          * 
1543 			For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
1544 		 
1545          */
1546         public  String getBubble()
1547  	 {
1548 			  			return myBubble.getValue();
1549 			  		}
1550 				
1551     	
1552 	    /**
1553          * 
1554 			For UE2. Current played animation of the bot.
1555 		 
1556          */
1557         protected
1558          StringProperty 
1559         myAnim
1560 					= new
1561 					StringProperty
1562 					(
1563 						getId(), 
1564 						"Anim", 
1565 						Anim, 
1566 						Player.class
1567 					);
1568 					
1569  		/**
1570          * 
1571 			For UE2. Current played animation of the bot.
1572 		 
1573          */
1574         public  String getAnim()
1575  	 {
1576 			  			return myAnim.getValue();
1577 			  		}
1578 				
1579  		
1580  	    public String toString() {
1581             return
1582             	super.toString() + "[" +
1583             	
1584 		              			"Id = " + String.valueOf(getId()
1585  	) + " | " + 
1586 		              		
1587 		              			"Name = " + String.valueOf(getName()
1588  	) + " | " + 
1589 		              		
1590 		              			"Spectator = " + String.valueOf(isSpectator()
1591  	) + " | " + 
1592 		              		
1593 		              			"Action = " + String.valueOf(getAction()
1594  	) + " | " + 
1595 		              		
1596 		              			"Rotation = " + String.valueOf(getRotation()
1597  	) + " | " + 
1598 		              		
1599 		              			"Location = " + String.valueOf(getLocation()
1600  	) + " | " + 
1601 		              		
1602 		              			"Velocity = " + String.valueOf(getVelocity()
1603  	) + " | " + 
1604 		              		
1605 		              			"Team = " + String.valueOf(getTeam()
1606  	) + " | " + 
1607 		              		
1608 		              			"Weapon = " + String.valueOf(getWeapon()
1609  	) + " | " + 
1610 		              		
1611 		              			"Crouched = " + String.valueOf(isCrouched()
1612  	) + " | " + 
1613 		              		
1614 		              			"Firing = " + String.valueOf(getFiring()
1615  	) + " | " + 
1616 		              		
1617 		              			"EmotLeft = " + String.valueOf(getEmotLeft()
1618  	) + " | " + 
1619 		              		
1620 		              			"EmotCenter = " + String.valueOf(getEmotCenter()
1621  	) + " | " + 
1622 		              		
1623 		              			"EmotRight = " + String.valueOf(getEmotRight()
1624  	) + " | " + 
1625 		              		
1626 		              			"Bubble = " + String.valueOf(getBubble()
1627  	) + " | " + 
1628 		              		
1629 		              			"Anim = " + String.valueOf(getAnim()
1630  	) + " | " + 
1631 		              		
1632 				"]";           		
1633         }
1634  	
1635  		
1636  		public String toHtmlString() {
1637  			return super.toString() + "[<br/>" +
1638             	
1639 		              			"<b>Id</b> = " + String.valueOf(getId()
1640  	) + " <br/> " + 
1641 		              		
1642 		              			"<b>Name</b> = " + String.valueOf(getName()
1643  	) + " <br/> " + 
1644 		              		
1645 		              			"<b>Spectator</b> = " + String.valueOf(isSpectator()
1646  	) + " <br/> " + 
1647 		              		
1648 		              			"<b>Action</b> = " + String.valueOf(getAction()
1649  	) + " <br/> " + 
1650 		              		
1651 		              			"<b>Rotation</b> = " + String.valueOf(getRotation()
1652  	) + " <br/> " + 
1653 		              		
1654 		              			"<b>Location</b> = " + String.valueOf(getLocation()
1655  	) + " <br/> " + 
1656 		              		
1657 		              			"<b>Velocity</b> = " + String.valueOf(getVelocity()
1658  	) + " <br/> " + 
1659 		              		
1660 		              			"<b>Team</b> = " + String.valueOf(getTeam()
1661  	) + " <br/> " + 
1662 		              		
1663 		              			"<b>Weapon</b> = " + String.valueOf(getWeapon()
1664  	) + " <br/> " + 
1665 		              		
1666 		              			"<b>Crouched</b> = " + String.valueOf(isCrouched()
1667  	) + " <br/> " + 
1668 		              		
1669 		              			"<b>Firing</b> = " + String.valueOf(getFiring()
1670  	) + " <br/> " + 
1671 		              		
1672 		              			"<b>EmotLeft</b> = " + String.valueOf(getEmotLeft()
1673  	) + " <br/> " + 
1674 		              		
1675 		              			"<b>EmotCenter</b> = " + String.valueOf(getEmotCenter()
1676  	) + " <br/> " + 
1677 		              		
1678 		              			"<b>EmotRight</b> = " + String.valueOf(getEmotRight()
1679  	) + " <br/> " + 
1680 		              		
1681 		              			"<b>Bubble</b> = " + String.valueOf(getBubble()
1682  	) + " <br/> " + 
1683 		              		
1684 		              			"<b>Anim</b> = " + String.valueOf(getAnim()
1685  	) + " <br/> " + 
1686 		              		
1687 				"<br/>]";     
1688 		}
1689  	
1690  		
1691  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
1692         	
1693 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
1694 		
1695 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=shared+classtype[@name=message]) ---
1696 	        
1697 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=shared+classtype[@name=message]) ---        	            	
1698  	
1699 		}
1700  	
1701     	
1702     	
1703  	
1704 		@Override
1705 		public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object) {
1706 			if (object == null)
1707 			{
1708 				return new IWorldObjectUpdateResult.WorldObjectUpdateResult(IWorldObjectUpdateResult.Result.CREATED, this);
1709 			}
1710 			if (!( object instanceof PlayerMessage) ) {
1711 				throw new PogamutException("Can't update different class than PlayerMessage, got class " + object.getClass().getSimpleName() + "!", this);		
1712 			}
1713 			PlayerMessage toUpdate = (PlayerMessage)object;
1714 			
1715 			boolean updated = false;
1716 			
1717 			// UPDATING LOCAL PROPERTIES
1718 			
1719 				if (!SafeEquals.equals(toUpdate.Jmx, getJmx()
1720  	)) {
1721 					toUpdate.Jmx=getJmx()
1722  	;
1723 					updated = true;
1724 				}
1725 			
1726 				if (toUpdate.Visible != isVisible()
1727  	) {
1728 				    toUpdate.Visible=isVisible()
1729  	;
1730 					updated = true;
1731 				}
1732 			
1733          	
1734          	// UPDATING SHARED PROPERTIES
1735          	
1736 				if (!SafeEquals.equals(toUpdate.Name, getName()
1737  	)) {
1738 					toUpdate.Name=getName()
1739  	;
1740 					updated = true;
1741 				}
1742 			
1743 				if (!SafeEquals.equals(toUpdate.Spectator, isSpectator()
1744  	)) {
1745 					toUpdate.Spectator=isSpectator()
1746  	;
1747 					updated = true;
1748 				}
1749 			
1750 				if (!SafeEquals.equals(toUpdate.Action, getAction()
1751  	)) {
1752 					toUpdate.Action=getAction()
1753  	;
1754 					updated = true;
1755 				}
1756 			
1757 				if (!SafeEquals.equals(toUpdate.Rotation, getRotation()
1758  	)) {
1759 					toUpdate.Rotation=getRotation()
1760  	;
1761 					updated = true;
1762 				}
1763 			
1764      		if (getLocation()
1765  	 != null) {
1766      	
1767 	            if (!SafeEquals.equals(toUpdate.Location, getLocation()
1768  	)) {
1769 					toUpdate.Location=getLocation()
1770  	;
1771 					updated = true;
1772 				}
1773 			
1774      		}
1775      	
1776 				if (!SafeEquals.equals(toUpdate.Velocity, getVelocity()
1777  	)) {
1778 					toUpdate.Velocity=getVelocity()
1779  	;
1780 					updated = true;
1781 				}
1782 			
1783 				if (toUpdate.Team != getTeam()
1784  	) {
1785 				    toUpdate.Team=getTeam()
1786  	;
1787 					updated = true;
1788 				}
1789 			
1790 				if (!SafeEquals.equals(toUpdate.Weapon, getWeapon()
1791  	)) {
1792 					toUpdate.Weapon=getWeapon()
1793  	;
1794 					updated = true;
1795 				}
1796 			
1797 				if (toUpdate.Crouched != isCrouched()
1798  	) {
1799 				    toUpdate.Crouched=isCrouched()
1800  	;
1801 					updated = true;
1802 				}
1803 			
1804 				if (toUpdate.Firing != getFiring()
1805  	) {
1806 				    toUpdate.Firing=getFiring()
1807  	;
1808 					updated = true;
1809 				}
1810 			
1811 				if (!SafeEquals.equals(toUpdate.EmotLeft, getEmotLeft()
1812  	)) {
1813 					toUpdate.EmotLeft=getEmotLeft()
1814  	;
1815 					updated = true;
1816 				}
1817 			
1818 				if (!SafeEquals.equals(toUpdate.EmotCenter, getEmotCenter()
1819  	)) {
1820 					toUpdate.EmotCenter=getEmotCenter()
1821  	;
1822 					updated = true;
1823 				}
1824 			
1825 				if (!SafeEquals.equals(toUpdate.EmotRight, getEmotRight()
1826  	)) {
1827 					toUpdate.EmotRight=getEmotRight()
1828  	;
1829 					updated = true;
1830 				}
1831 			
1832 				if (!SafeEquals.equals(toUpdate.Bubble, getBubble()
1833  	)) {
1834 					toUpdate.Bubble=getBubble()
1835  	;
1836 					updated = true;
1837 				}
1838 			
1839 				if (!SafeEquals.equals(toUpdate.Anim, getAnim()
1840  	)) {
1841 					toUpdate.Anim=getAnim()
1842  	;
1843 					updated = true;
1844 				}
1845 			
1846          	
1847          	// UPDATE TIME
1848          	toUpdate.SimTime = SimTime;
1849 			
1850 			if (updated) {
1851 				return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.UPDATED, toUpdate);
1852 			} else {
1853 				return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IWorldObject>(IWorldObjectUpdateResult.Result.SAME, toUpdate);
1854 			}
1855 		}
1856 		
1857 		@Override
1858 		public ILocalWorldObjectUpdatedEvent getLocalEvent() {
1859 			return new PlayerLocalImpl.PlayerLocalUpdate
1860     (this.getLocal(), SimTime);
1861 		}
1862 
1863 		@Override
1864 		public ISharedWorldObjectUpdatedEvent getSharedEvent() {
1865 			return new PlayerSharedImpl.PlayerSharedUpdate
1866     (this.getShared(), SimTime, this.getTeamId());
1867 		}
1868 
1869 		@Override
1870 		public IStaticWorldObjectUpdatedEvent getStaticEvent() {
1871 			return new PlayerStaticImpl.PlayerStaticUpdate
1872     (this.getStatic(), SimTime);
1873 		}
1874  	
1875  		
1876  	    public String toString() {
1877             return
1878             	super.toString() + "[" +
1879             	
1880 		              			"Id = " + String.valueOf(getId()
1881  	) + " | " + 
1882 		              		
1883 		              			"Jmx = " + String.valueOf(getJmx()
1884  	) + " | " + 
1885 		              		
1886 		              			"Name = " + String.valueOf(getName()
1887  	) + " | " + 
1888 		              		
1889 		              			"Spectator = " + String.valueOf(isSpectator()
1890  	) + " | " + 
1891 		              		
1892 		              			"Action = " + String.valueOf(getAction()
1893  	) + " | " + 
1894 		              		
1895 		              			"Visible = " + String.valueOf(isVisible()
1896  	) + " | " + 
1897 		              		
1898 		              			"Rotation = " + String.valueOf(getRotation()
1899  	) + " | " + 
1900 		              		
1901 		              			"Location = " + String.valueOf(getLocation()
1902  	) + " | " + 
1903 		              		
1904 		              			"Velocity = " + String.valueOf(getVelocity()
1905  	) + " | " + 
1906 		              		
1907 		              			"Team = " + String.valueOf(getTeam()
1908  	) + " | " + 
1909 		              		
1910 		              			"Weapon = " + String.valueOf(getWeapon()
1911  	) + " | " + 
1912 		              		
1913 		              			"Crouched = " + String.valueOf(isCrouched()
1914  	) + " | " + 
1915 		              		
1916 		              			"Firing = " + String.valueOf(getFiring()
1917  	) + " | " + 
1918 		              		
1919 		              			"EmotLeft = " + String.valueOf(getEmotLeft()
1920  	) + " | " + 
1921 		              		
1922 		              			"EmotCenter = " + String.valueOf(getEmotCenter()
1923  	) + " | " + 
1924 		              		
1925 		              			"EmotRight = " + String.valueOf(getEmotRight()
1926  	) + " | " + 
1927 		              		
1928 		              			"Bubble = " + String.valueOf(getBubble()
1929  	) + " | " + 
1930 		              		
1931 		              			"Anim = " + String.valueOf(getAnim()
1932  	) + " | " + 
1933 		              		
1934 				"]";           		
1935         }
1936  	
1937  		
1938  		public String toHtmlString() {
1939  			return super.toString() + "[<br/>" +
1940             	
1941 		              			"<b>Id</b> = " + String.valueOf(getId()
1942  	) + " <br/> " + 
1943 		              		
1944 		              			"<b>Jmx</b> = " + String.valueOf(getJmx()
1945  	) + " <br/> " + 
1946 		              		
1947 		              			"<b>Name</b> = " + String.valueOf(getName()
1948  	) + " <br/> " + 
1949 		              		
1950 		              			"<b>Spectator</b> = " + String.valueOf(isSpectator()
1951  	) + " <br/> " + 
1952 		              		
1953 		              			"<b>Action</b> = " + String.valueOf(getAction()
1954  	) + " <br/> " + 
1955 		              		
1956 		              			"<b>Visible</b> = " + String.valueOf(isVisible()
1957  	) + " <br/> " + 
1958 		              		
1959 		              			"<b>Rotation</b> = " + String.valueOf(getRotation()
1960  	) + " <br/> " + 
1961 		              		
1962 		              			"<b>Location</b> = " + String.valueOf(getLocation()
1963  	) + " <br/> " + 
1964 		              		
1965 		              			"<b>Velocity</b> = " + String.valueOf(getVelocity()
1966  	) + " <br/> " + 
1967 		              		
1968 		              			"<b>Team</b> = " + String.valueOf(getTeam()
1969  	) + " <br/> " + 
1970 		              		
1971 		              			"<b>Weapon</b> = " + String.valueOf(getWeapon()
1972  	) + " <br/> " + 
1973 		              		
1974 		              			"<b>Crouched</b> = " + String.valueOf(isCrouched()
1975  	) + " <br/> " + 
1976 		              		
1977 		              			"<b>Firing</b> = " + String.valueOf(getFiring()
1978  	) + " <br/> " + 
1979 		              		
1980 		              			"<b>EmotLeft</b> = " + String.valueOf(getEmotLeft()
1981  	) + " <br/> " + 
1982 		              		
1983 		              			"<b>EmotCenter</b> = " + String.valueOf(getEmotCenter()
1984  	) + " <br/> " + 
1985 		              		
1986 		              			"<b>EmotRight</b> = " + String.valueOf(getEmotRight()
1987  	) + " <br/> " + 
1988 		              		
1989 		              			"<b>Bubble</b> = " + String.valueOf(getBubble()
1990  	) + " <br/> " + 
1991 		              		
1992 		              			"<b>Anim</b> = " + String.valueOf(getAnim()
1993  	) + " <br/> " + 
1994 		              		
1995 				"<br/>]";     
1996 		}
1997  	
1998  		
1999  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
2000         	
2001 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
2002 		
2003 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=base+classtype[@name=message]) ---
2004 	        
2005 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=base+classtype[@name=message]) ---        	            	
2006  	
2007 		}
2008