package net.sf.arianne.marboard.server.entity.meta;
import marauroa.common.game.RPClass;
import marauroa.common.game.RPObject;
import marauroa.common.game.Definition.Type;
/**
* A user who is connected to the server and taking part in one zone.
*
* @author hendrik
*/
public class User extends MetaEntity {
/**
* creates an user object
*
* @param object RPObject
*/
public User(RPObject object) {
super(object);
}
/**
* creates an user object
*
* @param name name of user
*/
public User(String name) {
put("name", name);
}
/**
* gets the name of the user
*
* @return name of user
*/
public String getName() {
return get("name");
}
/**
* generates the class definition for marauroa.
*/
public static void generateRPClass() {
final RPClass user = new RPClass("user");
user.isA("meta_entity");
user.addAttribute("name", Type.STRING);
}
}