Skip to content

Commit 5cd8a84

Browse files
committed
Fix placeholders again
1 parent b22f3c4 commit 5cd8a84

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx1G
88
loader_version=0.11.0
99

1010
# Mod Properties
11-
mod_version = 0.1.2
11+
mod_version = 0.1.3
1212
maven_group = eu.pb4
1313
archives_base_name = placeholder-api

src/main/java/eu/pb4/placeholders/buildin/PlayerPlaceholders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void register() {
6666
int x = ctx.getPlayer().getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(Stats.PLAY_ONE_MINUTE));
6767
return PlaceholderResult.value(ctx.hasArgument()
6868
? DurationFormatUtils.formatDuration((long) x * 50, ctx.getArgument(), true)
69-
: Helpers.durationToString((long) x * 50)
69+
: Helpers.durationToString((long) x / 20)
7070
);
7171
} else {
7272
return PlaceholderResult.invalid("No player!");

src/main/java/eu/pb4/placeholders/buildin/ServerPlaceholders.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public static void register() {
4343
return PlaceholderResult.value(new LiteralText(String.format(format, tps)).formatted(tps > 19 ? Formatting.GREEN : tps > 16 ? Formatting.GOLD : Formatting.RED));
4444
});
4545

46-
PlaceholderAPI.register(new Identifier("server", "mspt"), (ctx) -> PlaceholderResult.value(String.valueOf(ctx.getServer().getTickTime())));
46+
PlaceholderAPI.register(new Identifier("server", "mspt"), (ctx) -> PlaceholderResult.value(String.format("%.0f", ctx.getServer().getTickTime())));
4747

4848
PlaceholderAPI.register(new Identifier("server", "mspt_colored"), (ctx) -> {
4949
float x = ctx.getServer().getTickTime();
50-
return PlaceholderResult.value(new LiteralText(String.valueOf(x)).formatted(x < 45 ? Formatting.GREEN : x < 51 ? Formatting.GOLD : Formatting.RED));
50+
return PlaceholderResult.value(new LiteralText(String.format("%.0f", x)).formatted(x < 45 ? Formatting.GREEN : x < 51 ? Formatting.GOLD : Formatting.RED));
5151
});
5252

5353

0 commit comments

Comments
 (0)