question: private static Event < RPEntity > createEventsForRPEntity ( RPEntity entity , RPEvent rpevent ) { String name = rpevent . getName ( ) ; Event < RPEntity > event = null ; if ( name . equals ( Events . PUBLIC_TEXT ) ) { event = new PublicTextEvent ( ) ; } else if ( name . equals ( Events . PRIVATE_TEXT ) ) { event = new PrivateTextEvent ( ) ; } else if ( name . equals ( Events . ATTACK ) ) { event = new AttackEvent ( ) ; } else if ( name . equals ( Events . TRADE_STATE_CHANGE ) ) { event = new TradeStateChangeEvent ( ) ; } else if ( name . equals ( Events . GROUP_CHANGE ) ) { event = new GroupChangeEvent ( ) ; } else if ( name . equals ( Events . GROUP_INVITE ) ) { event = new GroupInviteEvent ( ) ; } else if ( name . equals ( Events . PROGRESS_STATUS_CHANGE ) ) { event = new ProgressStatusEvent ( ) ; } else if ( name . equals ( Events . REACHED_ACHIEVEMENT ) ) { event = new ReachedAchievementEvent ( ) ; } if ( event != null ) { event . init ( entity , rpevent ) ; } return event ; }
target:  Creates events for normal RPEntities.