Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package Plugins.TheMaze.Enum;
  2.  
  3. import Plugins.BowEnder.ServerNetwork.ServerApi;
  4.  
  5. public enum GameStats {
  6.  
  7. LOBBY(true), PREGAME(false), GAME(false), FINISH(false);
  8.  
  9. private static GameStats current;
  10. private boolean canJoin;
  11.  
  12. GameStats(Boolean bool) {
  13. canJoin = bool;
  14. }
  15.  
  16. public boolean canJoin(){
  17. return canJoin;
  18. }
  19.  
  20. public static void setState(GameStats state){
  21. current = state;
  22.  
  23. if(current == GAME){
  24. ServerApi.SetFPlay_Leave(5);
  25. }else if(current == GameStats.PREGAME){
  26. ServerApi.SetFPlay_Leave(4);
  27. }
  28. }
  29.  
  30. public static boolean isState(GameStats state){
  31. return current == state;
  32. }
  33.  
  34. public static GameStats getState(){
  35. return current;
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement