Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. package org.model.players.content;
  2.  
  3. import org.*;
  4. import org.event.Events;
  5. import org.model.players.*;
  6.  
  7. public class UpTime {
  8.  
  9. public static int second, minute, hour, day;
  10.  
  11. public void getUptime() {
  12. World.getWorld().submit(new Events(1000) {
  13. public void execute() {
  14. second++;
  15. if (second == 60) {
  16. second = 0;
  17. minute++;
  18. } else if (minute == 60) {
  19. minute = 0;
  20. hour++;
  21. } else if (hour == 24) {
  22. hour = 0;
  23. day = 1;
  24. }
  25. }
  26. });
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement