de.jadv.lib.events.toclient
Class InNewLevelEvent

java.lang.Object
  |
  +--de.jadv.lib.events.JAdvEvent
        |
        +--de.jadv.lib.events.toclient.InNewLevelEvent
All Implemented Interfaces:
java.io.Serializable

public class InNewLevelEvent
extends JAdvEvent

Tells the client, that the player is now inside a new level

Author:
neitzel
See Also:
Serialized Form

Field Summary
protected  int _build
           
protected  java.lang.String _level
           
 
Fields inherited from class de.jadv.lib.events.JAdvEvent
BUFFERSIZE, CODE_AllPlayerStatsEvent, CODE_AttackEvent, CODE_AvailableRacesEvent, CODE_ErrorEvent, CODE_FightEvent, CODE_GetRacesEvent, CODE_InNewLevelEvent, CODE_IsLoggedInEvent, CODE_IsNotLoggedInEvent, CODE_JAdvEvent, CODE_LevelInformationEvent, CODE_LibVersionEvent, CODE_LoginEvent, CODE_MessageEvent, CODE_MoveObjectEvent, CODE_NeedLevelEvent, CODE_NewPlayerEvent, CODE_ObjectAttributesEvent, CODE_ObjectEvent, CODE_ObjectOutEvent, CODE_PlayerIDEvent, CODE_PlayerMoveEvent, CODE_QuitEvent, CODE_RequestLongEvent, CODE_RequestShortEvent, CODE_SendMessageEvent, CODE_ShortPlayerStatsEvent, CODE_SubObjectEvent, CODE_UnknownEvent, CODE_UseObjectEvent, debug, EVENT_CODER_VERSION
 
Constructor Summary
InNewLevelEvent(java.nio.ByteBuffer buf)
          Creates a new InNewLevelEvent from data of a given ByteBuffer
InNewLevelEvent(java.lang.String level, int build)
          Creates a new InNewLevelEvent
 
Method Summary
 java.nio.ByteBuffer encodeEvent()
          Encodes the Event to a ByteBuffer
 int getBuild()
          returns the build-Number of the level
 java.lang.String getLevel()
          Gets the ID of the Level
 
Methods inherited from class de.jadv.lib.events.JAdvEvent
decodeEvent, encodeEvent, getCreateTime, isNewer, isOlder, readBackground, readString, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_level

protected java.lang.String _level

_build

protected int _build
Constructor Detail

InNewLevelEvent

public InNewLevelEvent(java.lang.String level,
                       int build)
Creates a new InNewLevelEvent

Parameters:
level - - ID of the level
build - - build number of the level

InNewLevelEvent

public InNewLevelEvent(java.nio.ByteBuffer buf)
                throws java.io.IOException
Creates a new InNewLevelEvent from data of a given ByteBuffer

Parameters:
buf - - the ByteBuffer to read the event from
Throws:
java.io.IOException
Method Detail

encodeEvent

public java.nio.ByteBuffer encodeEvent()
                                throws java.io.IOException
Encodes the Event to a ByteBuffer

Specified by:
encodeEvent in class JAdvEvent
Returns:
ByteBuffer with Event on it!
Throws:
java.io.IOException

getLevel

public java.lang.String getLevel()
Gets the ID of the Level

Returns:
the ID of the level (String)

getBuild

public int getBuild()
returns the build-Number of the level

Returns:
Build number of the Level (int)