1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-02 15:33:30 +01:00
Jobs/com/gamingmesh/jobs/container/TopList.java

33 lines
663 B
Java
Raw Normal View History

2015-08-21 15:10:08 +02:00
package com.gamingmesh.jobs.container;
2016-03-30 15:42:36 +02:00
import java.util.Map.Entry;
import com.gamingmesh.jobs.Jobs;
2015-08-21 15:10:08 +02:00
public final class TopList {
2016-03-30 15:42:36 +02:00
private int id;
private int level;
private int exp;
2015-08-21 15:10:08 +02:00
2016-03-30 15:42:36 +02:00
public TopList(int id, int level, int exp) {
this.id = id;
this.level = level;
this.exp = exp;
}
2015-08-21 15:10:08 +02:00
public String getPlayerName() {
2016-03-30 15:42:36 +02:00
Entry<String, PlayerInfo> info = Jobs.getPlayerManager().getPlayerInfoById(this.id);
if (info != null) {
if (info.getValue().getName() != null)
return info.getValue().getName();
2015-08-21 15:10:08 +02:00
}
2016-03-30 15:42:36 +02:00
return "Unknown";
}
2015-08-21 15:10:08 +02:00
public int getLevel() {
return this.level;
}
2015-08-21 15:10:08 +02:00
public int getExp() {
return this.exp;
}
2015-08-21 15:10:08 +02:00
}