Package net.sf.arianne.marboard.server.entity.meta

Source Code of net.sf.arianne.marboard.server.entity.meta.User

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);
  }
}
TOP

Related Classes of net.sf.arianne.marboard.server.entity.meta.User

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.