Block.java

key0-96/src/effect/Block.java · 653 B

From the archive key0-96.tar.bz2

Download the archive   « Back to the archive contents

/**
  *  Block:
  *
  *    When a player leaves a room
  *
 */

package key.effect;
import key.*;
import java.util.StringTokenizer;

public class Block extends Blocking
{
	protected Scape loc;
	protected String message;
	
	/**
	  *  Creates a new movement
	  * @param from the player who sent it
	 */
	public Block( Player from, Scape left, String format )
	{
		super( from );
		loc = left;
		message = Grammar.substitute( format, from.getCodes() );
	}
	
	public Scape blockOf()
	{
		return( loc );
	}
	
	public String getMessage( Player receiver )
	{
		return( message );
	}
	
	public void cause()
	{
		loc.splashExcept( this, originator, null );
	}
}

Site Stats

Snippets: 1791
Codebases: 571