9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-26 02:19:28 +00:00

del time-24

This commit is contained in:
jhqwqmc
2024-04-07 21:12:10 +08:00
parent efbf2d3b64
commit fa914d52a2

View File

@@ -139,14 +139,6 @@ public class PluginPlaceholders extends PlaceholderExpansion {
if (minutes < 10) return hours + ":0" + minutes + ap;
else return hours + ":" + minutes + ap;
}
case "time-24" -> {
long time = onlinePlayer.getWorld().getTime();
double converttime = time * 3.6;
int hours = (int) Math.floor(converttime % 86400 / 3600);
int minutes = (int) Math.floor(converttime % 3600 / 60);
int mchours = hours <= 17 ? hours + 6 : hours - 18;
return mchours + ":" + (minutes >= 10 ? minutes : "0"+minutes);
}
case "actionbar" -> {
return plugin.getActionBarManager().getOtherPluginActionBar(onlinePlayer);
}