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.
-
-
Constructor Summary
Constructors Constructor Description PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date)
Creates a PlayerKill object with given parameters.PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName)
PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName, java.lang.String killerName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getDate()
Get the date the object holds.java.util.UUID
getKiller()
java.util.Optional<java.lang.String>
getKillerName()
java.util.UUID
getVictim()
java.util.Optional<java.lang.String>
getVictimName()
java.lang.String
getWeapon()
Get the Weapon used as string.int
hashCode()
boolean
isNotSelfKill()
boolean
isSelfKill()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PlayerKill
public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date)
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
public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName)
-
PlayerKill
public PlayerKill(java.util.UUID killer, java.util.UUID victim, java.lang.String weapon, long date, java.lang.String victimName, java.lang.String killerName)
-
-
Method Detail
-
getKiller
public java.util.UUID getKiller()
-
getVictim
public java.util.UUID getVictim()
-
getVictimName
public java.util.Optional<java.lang.String> getVictimName()
-
getKillerName
public java.util.Optional<java.lang.String> getKillerName()
-
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()
-
-