Class ActiveSession
- java.lang.Object
-
- com.djrapitops.plan.gathering.domain.ActiveSession
-
public class ActiveSession extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ActiveSession.FirstSession
-
Constructor Summary
Constructors Constructor Description ActiveSession(java.util.UUID playerUUID, ServerUUID serverUUID, long start, java.lang.String world, java.lang.String gameMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAfkTime(long time)
void
addDeath()
void
addMobKill()
void
addPlayerKill(PlayerKill kill)
void
changeState(java.lang.String world, java.lang.String gameMode, long time)
boolean
equals(java.lang.Object o)
static ActiveSession
fromPlayerJoin(PlayerJoin join)
DataMap
getExtraData()
<T> java.util.Optional<T>
getExtraData(java.lang.Class<T> ofType)
java.util.UUID
getPlayerUUID()
ServerUUID
getServerUUID()
long
getStart()
int
hashCode()
void
setAsFirstSessionIfMatches(java.lang.Long registerDate)
FinishedSession
toFinishedSession(long end)
FinishedSession
toFinishedSessionFromStillActive()
java.lang.String
toString()
void
updateState()
-
-
-
Constructor Detail
-
ActiveSession
public ActiveSession(java.util.UUID playerUUID, ServerUUID serverUUID, long start, java.lang.String world, java.lang.String gameMode)
-
-
Method Detail
-
fromPlayerJoin
public static ActiveSession fromPlayerJoin(PlayerJoin join)
-
toFinishedSessionFromStillActive
public FinishedSession toFinishedSessionFromStillActive()
-
toFinishedSession
public FinishedSession toFinishedSession(long end)
-
getPlayerUUID
public java.util.UUID getPlayerUUID()
-
getServerUUID
public ServerUUID getServerUUID()
-
getStart
public long getStart()
-
addAfkTime
public void addAfkTime(long time)
-
addDeath
public void addDeath()
-
addMobKill
public void addMobKill()
-
addPlayerKill
public void addPlayerKill(PlayerKill kill)
-
setAsFirstSessionIfMatches
public void setAsFirstSessionIfMatches(java.lang.Long registerDate)
-
getExtraData
public DataMap getExtraData()
-
updateState
public void updateState()
-
changeState
public void changeState(java.lang.String world, java.lang.String gameMode, long time)
-
getExtraData
public <T> java.util.Optional<T> getExtraData(java.lang.Class<T> ofType)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-