mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-27 12:38:21 +01:00
Fixed the "deprecated" messages for topten placeholders
This commit is contained in:
parent
dae58b8dff
commit
cc1cca1453
@ -31,7 +31,7 @@ public class TopTenNamePlaceholder implements PlaceholderReplacer {
|
|||||||
@Override
|
@Override
|
||||||
public String onReplace(User user) {
|
public String onReplace(User user) {
|
||||||
level.logWarning("You are using a deprecated placeholder.");
|
level.logWarning("You are using a deprecated placeholder.");
|
||||||
level.log("Please replace any occurrence of 'Level_" + gm.getDescription().getName().toLowerCase() + "-island-top-name-#'");
|
level.log("Please replace any occurrence of 'Level_" + gm.getDescription().getName().toLowerCase() + "-island-level-top-name-#'");
|
||||||
level.log("by 'Level_" + gm.getDescription().getName().toLowerCase() + "_top_name_#'");
|
level.log("by 'Level_" + gm.getDescription().getName().toLowerCase() + "_top_name_#'");
|
||||||
Collection<UUID> values = level.getTopTen().getTopTenList(gm.getOverWorld()).getTopTen().keySet();
|
Collection<UUID> values = level.getTopTen().getTopTenList(gm.getOverWorld()).getTopTen().keySet();
|
||||||
return values.size() < i ? "" : level.getPlayers().getName(values.stream().skip(i).findFirst().orElse(null));
|
return values.size() < i ? "" : level.getPlayers().getName(values.stream().skip(i).findFirst().orElse(null));
|
||||||
|
@ -31,7 +31,7 @@ public class TopTenPlaceholder implements PlaceholderReplacer {
|
|||||||
@Override
|
@Override
|
||||||
public String onReplace(User user) {
|
public String onReplace(User user) {
|
||||||
level.logWarning("You are using a deprecated placeholder.");
|
level.logWarning("You are using a deprecated placeholder.");
|
||||||
level.log("Please replace any occurrence of 'Level_" + gm.getDescription().getName().toLowerCase() + "-island-top-value-#'");
|
level.log("Please replace any occurrence of 'Level_" + gm.getDescription().getName().toLowerCase() + "-island-level-top-value-#'");
|
||||||
level.log("by 'Level_" + gm.getDescription().getName().toLowerCase() + "_top_value_#'");
|
level.log("by 'Level_" + gm.getDescription().getName().toLowerCase() + "_top_value_#'");
|
||||||
Collection<Long> values = level.getTopTen().getTopTenList(gm.getOverWorld()).getTopTen().values();
|
Collection<Long> values = level.getTopTen().getTopTenList(gm.getOverWorld()).getTopTen().values();
|
||||||
return values.size() < i ? "" : values.stream().skip(i).findFirst().map(String::valueOf).orElse("");
|
return values.size() < i ? "" : values.stream().skip(i).findFirst().map(String::valueOf).orElse("");
|
||||||
|
Loading…
Reference in New Issue
Block a user