mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-08-13 15:53:47 -04:00
d7e4583d3b
Removed unused imports. Addressed all warnings. Made all fields in Player class private (added getters and setters where needed). Removed dead code.
49 lines
1.1 KiB
Java
49 lines
1.1 KiB
Java
package org.moparscape.msc.gs.phandler;
|
|
|
|
/**
|
|
* The definition of a packet handler, for use with XStream.
|
|
*/
|
|
public class PacketHandlerDef {
|
|
/**
|
|
* The name of the handler class
|
|
*/
|
|
public String className;
|
|
/**
|
|
* The IDs of packets which the handler is responsible for
|
|
*/
|
|
public int[] ids;
|
|
|
|
/**
|
|
* Constructs a new packet handler definition, entailing that packets with
|
|
* the given IDs are to be handled by the specified class.
|
|
*
|
|
* @param ids
|
|
* The IDs of packets to be handled
|
|
* @param className
|
|
* The name of the packet handler class
|
|
*/
|
|
public PacketHandlerDef(int[] ids, String className) {
|
|
this.ids = ids;
|
|
this.className = className;
|
|
}
|
|
|
|
/**
|
|
* Returns the IDs of packets to be handled.
|
|
*
|
|
* @return An <code>int</code> array containing the IDs of packets to be
|
|
* handled.
|
|
*/
|
|
public int[] getAssociatedPackets() {
|
|
return ids;
|
|
}
|
|
|
|
/**
|
|
* Returns the name of the packet handler class.
|
|
*
|
|
* @return The name of the packet handler's class
|
|
*/
|
|
public String getClassName() {
|
|
return className;
|
|
}
|
|
}
|