Ruslan_Isaev

времечко

Mar 7th, 2021
436
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static long getPlaytimeHours(String nickname) {
  2.         Player player = Bukkit.getPlayer(nickname);
  3.  
  4.         long seconds = player.getStatistic(PLAY_ONE_TICK) / 20;
  5.         long hours = seconds / 3600;
  6.         return hours;
  7.     }
  8.  
  9.     public static long getPlaytimeMinutes(String nickname) {
  10.         Player player = Bukkit.getPlayer(nickname);
  11.  
  12.         long seconds = player.getStatistic(PLAY_ONE_TICK) / 20;
  13.         long minutes = seconds / 60 % 60;
  14.         return minutes;
  15.     }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×