Class 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)  
    • 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 interface DateHolder
        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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isSelfKill

        public boolean isSelfKill()
      • isNotSelfKill

        public boolean isNotSelfKill()