RuneHive-Game
Loading...
Searching...
No Matches
GameRecord.java
Go to the documentation of this file.
1package com.runehive.content.activity.record;
2
3import com.runehive.content.activity.ActivityType;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.util.Utility;
6
7import java.util.Objects;
8
9public class GameRecord {
10 public final String name;
11 public final String date;
12 public final int rank;
13 public final long time;
15
16 private GameRecord(String name, String date, int rank, long time, ActivityType activityType) {
17 this.name = name;
18 this.date = date;
19 this.rank = rank;
20 this.time = time;
21 this.activityType = activityType;
22 }
23
25 this(player.getName(), Utility.getSimpleDate(), player.right.getCrown(), time, activity);
26 }
27
28 @Override
29 public int hashCode() {
30 return Objects.hash(name, time);
31 }
32
33 @Override
34 public String toString() {
35 return "name=" + name + " time=" + time + " type=" + activityType;
36 }
37
38}
GameRecord(String name, String date, int rank, long time, ActivityType activityType)
GameRecord(Player player, long time, ActivityType activity)
This class represents a character controlled by a player.
Definition Player.java:125
String getName()
Gets the name of this entity.
Definition Player.java:774
Handles miscellaneous methods.
Definition Utility.java:27
static String getSimpleDate()
Gets the date of server.
Definition Utility.java:131
Holds all activity types that are timed.
static String getCrown(Player player)
Gets the crown display.