mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 06:57:39 +01:00
Fix format parsing in /ptime (Fixes #5655)
This commit is contained in:
parent
1e040fa7b5
commit
596ba6e2f5
@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
|
|||||||
import com.earth2me.essentials.CommandSource;
|
import com.earth2me.essentials.CommandSource;
|
||||||
import com.earth2me.essentials.IUser;
|
import com.earth2me.essentials.IUser;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
|
import com.earth2me.essentials.utils.AdventureUtil;
|
||||||
import com.earth2me.essentials.utils.DescParseTickFormat;
|
import com.earth2me.essentials.utils.DescParseTickFormat;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
@ -82,7 +83,7 @@ public class Commandptime extends EssentialsLoopCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String formattedTime = DescParseTickFormat.format(ticks);
|
final String formattedTime = DescParseTickFormat.format(ticks);
|
||||||
sender.sendTl(fixed ? "pTimeSetFixed" : "pTimeSet", formattedTime, joiner.toString());
|
sender.sendTl(fixed ? "pTimeSetFixed" : "pTimeSet", AdventureUtil.parsed(formattedTime), joiner.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getUserTime(final CommandSource sender, final IUser user) {
|
public void getUserTime(final CommandSource sender, final IUser user) {
|
||||||
@ -96,7 +97,7 @@ public class Commandptime extends EssentialsLoopCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String time = DescParseTickFormat.format(user.getBase().getPlayerTime());
|
final String time = DescParseTickFormat.format(user.getBase().getPlayerTime());
|
||||||
sender.sendTl(user.getBase().isPlayerTimeRelative() ? "pTimeCurrent" : "pTimeCurrentFixed", user.getName(), time);
|
sender.sendTl(user.getBase().isPlayerTimeRelative() ? "pTimeCurrent" : "pTimeCurrentFixed", user.getName(), AdventureUtil.parsed(time));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUserTime(final User user, final Long ticks, final Boolean relative) {
|
private void setUserTime(final User user, final Long ticks, final Boolean relative) {
|
||||||
|
Loading…
Reference in New Issue
Block a user