mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix currently online for seen info.
This commit is contained in:
parent
817a5bc16e
commit
29a0b68dcb
@ -454,6 +454,7 @@ public enum C {
|
|||||||
* Info
|
* Info
|
||||||
*/
|
*/
|
||||||
NONE("None", "Info"),
|
NONE("None", "Info"),
|
||||||
|
NOW("Now", "Info"),
|
||||||
NEVER("Never", "Info"),
|
NEVER("Never", "Info"),
|
||||||
UNKNOWN("Unknown", "Info"),
|
UNKNOWN("Unknown", "Info"),
|
||||||
EVERYONE("Everyone", "Info"),
|
EVERYONE("Everyone", "Info"),
|
||||||
|
@ -719,10 +719,18 @@ public class MainUtil {
|
|||||||
String trusted = getPlayerList(plot.getTrusted());
|
String trusted = getPlayerList(plot.getTrusted());
|
||||||
String members = getPlayerList(plot.getMembers());
|
String members = getPlayerList(plot.getMembers());
|
||||||
String denied = getPlayerList(plot.getDenied());
|
String denied = getPlayerList(plot.getDenied());
|
||||||
String seen = C.UNKNOWN.s();
|
String seen;
|
||||||
if (Settings.Enabled_Components.PLOT_EXPIRY) {
|
if (Settings.Enabled_Components.PLOT_EXPIRY) {
|
||||||
int time = (int) (ExpireManager.IMP.getAge(plot) / 1000);
|
if (plot.isOnline()) {
|
||||||
seen = MainUtil.secToTime(time);
|
seen = C.NOW.s();
|
||||||
|
} else {
|
||||||
|
int time = (int) (ExpireManager.IMP.getAge(plot) / 1000);
|
||||||
|
if (time != 0) {
|
||||||
|
seen = MainUtil.secToTime(time);
|
||||||
|
} else {
|
||||||
|
seen = C.UNKNOWN.s();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
seen = C.NEVER.s();
|
seen = C.NEVER.s();
|
||||||
}
|
}
|
||||||
@ -741,9 +749,7 @@ public class MainUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
boolean build = plot.isAdded(player.getUUID());
|
boolean build = plot.isAdded(player.getUUID());
|
||||||
|
|
||||||
String owner = plot.getOwners().isEmpty() ? "unowned" : getPlayerList(plot.getOwners());
|
String owner = plot.getOwners().isEmpty() ? "unowned" : getPlayerList(plot.getOwners());
|
||||||
|
|
||||||
info = info.replace("%id%", plot.getId().toString());
|
info = info.replace("%id%", plot.getId().toString());
|
||||||
info = info.replace("%alias%", alias);
|
info = info.replace("%alias%", alias);
|
||||||
info = info.replace("%num%", String.valueOf(num));
|
info = info.replace("%num%", String.valueOf(num));
|
||||||
@ -771,10 +777,6 @@ public class MainUtil {
|
|||||||
String info;
|
String info;
|
||||||
if (full && Settings.Ratings.CATEGORIES != null && Settings.Ratings.CATEGORIES.size() > 1) {
|
if (full && Settings.Ratings.CATEGORIES != null && Settings.Ratings.CATEGORIES.size() > 1) {
|
||||||
double[] ratings = MainUtil.getAverageRatings(plot);
|
double[] ratings = MainUtil.getAverageRatings(plot);
|
||||||
for (double v : ratings) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
String rating = "";
|
String rating = "";
|
||||||
String prefix = "";
|
String prefix = "";
|
||||||
for (int i = 0; i < ratings.length; i++) {
|
for (int i = 0; i < ratings.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user