Class PlayerKill
- java.lang.Object
-
- com.djrapitops.plan.gathering.domain.PlayerKill
-
- All Implemented Interfaces:
DateHolder
public class PlayerKill extends java.lang.Object implements DateHolder
Represents a player vs player kill.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlayerKill.Killer
static class
PlayerKill.Victim
-
Constructor Summary
Constructors Constructor Description PlayerKill(PlayerKill.Killer killer, PlayerKill.Victim victim, ServerIdentifier server, java.lang.String weapon, long date)
PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date)
Deprecated.PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName)
Deprecated.PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName, java.lang.String killerName)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getDate()
Get the date the object holds.PlayerKill.Killer
getKiller()
java.util.Optional<java.lang.String>
getKillerName()
Deprecated.java.util.UUID
getKillerUUID()
Deprecated.ServerIdentifier
getServer()
PlayerKill.Victim
getVictim()
java.util.Optional<java.lang.String>
getVictimName()
Deprecated.java.util.UUID
getVictimUUID()
Deprecated.java.lang.String
getWeapon()
Get the Weapon used as string.int
hashCode()
boolean
isNotSelfKill()
boolean
isSelfKill()
java.lang.String
toJson()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PlayerKill
@Deprecated public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date)
Deprecated.Creates a PlayerKill object with given parameters.- Parameters:
killer
- UUID of the killer.victim
- UUID of the victim.weapon
- Weapon used.date
- Epoch millisecond at which the kill occurred.
-
PlayerKill
@Deprecated public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName)
Deprecated.
-
PlayerKill
@Deprecated public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName, java.lang.String killerName)
Deprecated.
-
PlayerKill
public PlayerKill(PlayerKill.Killer killer, PlayerKill.Victim victim, ServerIdentifier server, java.lang.String weapon, long date)
-
-
Method Detail
-
getKillerUUID
@Deprecated public java.util.UUID getKillerUUID()
Deprecated.
-
getVictimUUID
@Deprecated public java.util.UUID getVictimUUID()
Deprecated.
-
getVictimName
@Deprecated public java.util.Optional<java.lang.String> getVictimName()
Deprecated.
-
getKillerName
@Deprecated public java.util.Optional<java.lang.String> getKillerName()
Deprecated.
-
getKiller
public PlayerKill.Killer getKiller()
-
getVictim
public PlayerKill.Victim getVictim()
-
getServer
public ServerIdentifier getServer()
-
getDate
public long getDate()
Description copied from interface:DateHolder
Get the date the object holds.- Specified by:
getDate
in interfaceDateHolder
- Returns:
- Epoch ms - milliseconds passed since January 1st 1970.
-
getWeapon
public java.lang.String getWeapon()
Get the Weapon used as string.- Returns:
- For example DIAMOND_SWORD
-
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
-
isSelfKill
public boolean isSelfKill()
-
isNotSelfKill
public boolean isNotSelfKill()
-
toJson
public java.lang.String toJson()
-
-