RuneHive-Game
Loading...
Searching...
No Matches
GameRecord.java
Go to the documentation of this file.
1
package
com.runehive.content.activity.record;
2
3
import
com.runehive.content.activity.ActivityType;
4
import
com.runehive.game.world.entity.mob.player.Player;
5
import
com.runehive.util.Utility;
6
7
import
java.util.Objects;
8
9
public
class
GameRecord
{
10
public
final
String
name
;
11
public
final
String
date
;
12
public
final
int
rank
;
13
public
final
long
time
;
14
final
ActivityType
activityType
;
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
24
GameRecord
(
Player
player,
long
time
,
ActivityType
activity
) {
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
}
com.runehive.content.activity.record.GameRecord.date
final String date
Definition
GameRecord.java:11
com.runehive.content.activity.record.GameRecord.activityType
final ActivityType activityType
Definition
GameRecord.java:14
com.runehive.content.activity.record.GameRecord.rank
final int rank
Definition
GameRecord.java:12
com.runehive.content.activity.record.GameRecord.name
final String name
Definition
GameRecord.java:10
com.runehive.content.activity.record.GameRecord.hashCode
int hashCode()
Definition
GameRecord.java:29
com.runehive.content.activity.record.GameRecord.time
final long time
Definition
GameRecord.java:13
com.runehive.content.activity.record.GameRecord.GameRecord
GameRecord(String name, String date, int rank, long time, ActivityType activityType)
Definition
GameRecord.java:16
com.runehive.content.activity.record.GameRecord.GameRecord
GameRecord(Player player, long time, ActivityType activity)
Definition
GameRecord.java:24
com.runehive.content.activity.record.GameRecord.toString
String toString()
Definition
GameRecord.java:34
com.runehive.game.world.entity.mob.player.Player
This class represents a character controlled by a player.
Definition
Player.java:125
com.runehive.game.world.entity.mob.player.Player.getName
String getName()
Gets the name of this entity.
Definition
Player.java:774
com.runehive.game.world.entity.mob.player.Player.right
PlayerRight right
Definition
Player.java:216
com.runehive.util.Utility
Handles miscellaneous methods.
Definition
Utility.java:27
com.runehive.util.Utility.getSimpleDate
static String getSimpleDate()
Gets the date of server.
Definition
Utility.java:131
com.runehive.content.activity.ActivityType
Holds all activity types that are timed.
Definition
ActivityType.java:12
com.runehive.game.world.entity.mob.player.PlayerRight.getCrown
static String getCrown(Player player)
Gets the crown display.
Definition
PlayerRight.java:153
com.runehive.content.activity
Definition
Activity.java:1