public abstract class MapDisplay
extends java.lang.Object
Constructor and Description |
---|
MapDisplay(java.lang.String id,
int startId,
int mapWidth,
int mapHeight) |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(RadioObserver... obs)
Add an observer
|
abstract void |
clear()
Clear this map's buffer completely
|
java.lang.String |
getId()
Simple any case string identifier
|
int |
getMapHeight()
Height of this display in map lengths
|
int |
getMapId()
Top left map id
|
int |
getMapWidth()
Width of this display in map lengths
|
MapDisplayProvider |
getSource()
Get the
MapDisplayProvider |
boolean |
isObserving(RadioObserver observer)
Check if an observer is observing this map; does not necessarily have to be online
|
void |
onClick(org.bukkit.entity.Entity entity,
DisplayInteract action,
int id,
int x,
int y)
On interact, either a player or a projectile
|
void |
removeObserver(RadioObserver... obs)
Remove an observer, if they are observing
|
void |
removeObservers()
Remove all observers
|
void |
setSource(MapDisplayProvider provider)
Set the
MapDisplayProvider |
void |
terminate()
Kill this MapDisplay
|
abstract void |
update()
Update either the
MapDisplayProvider 's current frame or the buffer |
abstract void |
update(Frame frame)
Update the display with a given frame
|
abstract void |
update(RadioObserver... observers)
Update for the specified observers only; they do NOT have to be observing
|
public MapDisplay(java.lang.String id, int startId, int mapWidth, int mapHeight)
public java.lang.String getId()
public int getMapId()
public int getMapWidth()
public int getMapHeight()
public MapDisplayProvider getSource()
MapDisplayProvider
public void setSource(MapDisplayProvider provider)
MapDisplayProvider
provider
- public void terminate()
public void addObserver(RadioObserver... obs)
obs
- public void removeObserver(RadioObserver... obs)
obs
- public boolean isObserving(RadioObserver observer)
observer
- An observerpublic void removeObservers()
public void onClick(org.bukkit.entity.Entity entity, DisplayInteract action, int id, int x, int y)
entity
- The entity that interacts, should only be a projectile if action is DisplayInteract.PROJECTILE
action
- The action that occursid
- The id of the map pressedx
- The X relative to the mapy
- The Y relative to the mappublic abstract void clear()
public abstract void update()
MapDisplayProvider
's current frame or the bufferpublic abstract void update(RadioObserver... observers)
observers
- An array of observerspublic abstract void update(Frame frame)
frame
- An arbitary frame