public class DuelChallenge
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
DuelChallenge.ChallengeExpire
Starts the arena.
|
class |
DuelChallenge.PositionCheck |
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<java.lang.Boolean>[] |
accepted |
protected Point |
centerLoc |
protected java.lang.String |
challenged |
protected int |
challengeID |
protected java.lang.String |
challenger |
protected int |
duelType |
protected OID |
flagOid |
protected int |
state |
protected java.util.ArrayList<OID>[] |
teams |
protected java.lang.Integer |
testTimer
Iterates through every player in the duel and makes sure they are still within
30m of the center point of the duel.
|
Constructor and Description |
---|
DuelChallenge()
The default constructor.
|
DuelChallenge(java.lang.String challenger,
java.lang.String challenged,
java.util.ArrayList<OID>[] oids,
int type,
int id,
OID instanceOid)
Constructor that takes in the challenger, the challenged, and all players involved
and creates a new DuelChallenge object.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.lang.Boolean>[] |
getAccepted() |
Point |
getCenter() |
java.lang.String |
getChallenged() |
int |
getChallengeID() |
java.lang.String |
getChallenger() |
int |
getDuelType() |
OID |
getFlagOid() |
int |
getState() |
java.util.ArrayList<OID>[] |
getTeam() |
java.util.ArrayList<OID> |
getTeam(int team) |
void |
playerAccept(OID acceptOid)
Sets the players accepted property to true.
|
void |
playerDeclined(OID delineOid)
Cancels the duel challenge because a player does not wish to partake in the duel.
|
void |
playerDisconnected(OID delineOid,
java.lang.String name)
Cancels the duel challenge because a player has disconnected.
|
void |
setAccepted(java.util.ArrayList<java.lang.Boolean>[] accepted) |
void |
setCenter(Point centerLoc) |
void |
setChallenged(java.lang.String challenged) |
void |
setChallengeID(int challengeID) |
void |
setChallenger(java.lang.String challenger) |
void |
setDuelType(int duelType) |
void |
setFlagOid(OID flagOid) |
void |
setState(int state) |
void |
setTeam(java.util.ArrayList<OID>[] teams) |
void |
setTeam(int team,
java.util.ArrayList<OID> teams) |
void |
setup(OID instanceOid)
This is run once the Duel Challenge object is created.
|
protected int challengeID
protected int duelType
protected Point centerLoc
protected java.util.ArrayList<OID>[] teams
protected java.util.ArrayList<java.lang.Boolean>[] accepted
protected java.lang.String challenger
protected java.lang.String challenged
protected int state
protected OID flagOid
protected java.lang.Integer testTimer
public DuelChallenge()
public DuelChallenge(java.lang.String challenger, java.lang.String challenged, java.util.ArrayList<OID>[] oids, int type, int id, OID instanceOid)
challenger:
- the oid of the challengerchallenged:
- the oid of the player who was challengedoids:
- a list of all players involved broken up into teamstype:
- the type of duelid:
- the identification number of the arenapublic void setup(OID instanceOid)
public void playerAccept(OID acceptOid)
acceptOid:
- the oid of the player who has accepted this duel.public void playerDeclined(OID delineOid)
oid:
- the oid of the player who declined the duelpublic void playerDisconnected(OID delineOid, java.lang.String name)
oid:
- the oid of the player who disconnectedname:
- the name of the player who disconnectedpublic int getChallengeID()
public void setChallengeID(int challengeID)
public int getDuelType()
public void setDuelType(int duelType)
public int getState()
public void setState(int state)
public java.util.ArrayList<OID>[] getTeam()
public void setTeam(java.util.ArrayList<OID>[] teams)
public java.util.ArrayList<OID> getTeam(int team)
public void setTeam(int team, java.util.ArrayList<OID> teams)
public java.util.ArrayList<java.lang.Boolean>[] getAccepted()
public void setAccepted(java.util.ArrayList<java.lang.Boolean>[] accepted)
public java.lang.String getChallenger()
public void setChallenger(java.lang.String challenger)
public java.lang.String getChallenged()
public void setChallenged(java.lang.String challenged)
public Point getCenter()
public void setCenter(Point centerLoc)
public OID getFlagOid()
public void setFlagOid(OID flagOid)