Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Integrations: add lastonline and firstonline placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Nov 10, 2023
1 parent e24dcd3 commit a31e69e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.flectone.chat.model.player.FPlayer;
import net.flectone.chat.module.FModule;
import net.flectone.chat.module.player.name.NameModule;
import net.flectone.chat.util.TimeUtil;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -57,6 +58,9 @@ public String onRequest(@Nullable OfflinePlayer player, @NotNull String params)
};
}

return switch (params.toLowerCase()) {
case "lastonline" -> TimeUtil.convertTime(fPlayer.getPlayer(), player.getLastPlayed());
case "firstonline" -> TimeUtil.convertTime(fPlayer.getPlayer(), player.getFirstPlayed());
case "stream_prefix" -> fPlayer.getStreamPrefix();
case "afk_suffix" -> fPlayer.getAfkSuffix();
case "world_prefix" -> fPlayer.getWorldPrefix();
Expand Down

0 comments on commit a31e69e

Please sign in to comment.