Advertisement
Tyluur

Untitled

Jun 13th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. package com.rs.utils.misc;
  2.  
  3. /**
  4. * Holds the return codes that can be sent to the client when attempting to login.
  5. * @author Emperor
  6. *
  7. */
  8. public enum ReturnCodes {
  9.  
  10. /**
  11. * An unexpected server response occured.
  12. */
  13. UNEXPECTED_RESPONSE(0),
  14.  
  15. /**
  16. * Could not display advertisement video, logging in in x seconds.
  17. */
  18. COULD_NOT_DISPLAY_AD(1),
  19.  
  20. /**
  21. * A succesful login.
  22. */
  23. SUCCESFUL(2),
  24.  
  25. /**
  26. * Invalid username or password has been entered.
  27. */
  28. INVALID_CREDENTIALS(3),
  29.  
  30. /**
  31. * This account is banned.
  32. */
  33. ACCOUNT_DISABLED(4),
  34.  
  35. /**
  36. * This account is already logged in.
  37. */
  38. ALREADY_ONLINE(5),
  39.  
  40. /**
  41. * We have updated and client needs to be reloaded.
  42. */
  43. UPDATED(6),
  44.  
  45. /**
  46. * The world is full.
  47. */
  48. WORLD_FULL(7),
  49.  
  50. /**
  51. * Login server is offline.
  52. */
  53. LOGIN_SERVER_OFFLINE(8),
  54.  
  55. /**
  56. * The login limit has been exceeded.
  57. */
  58. LOGIN_LIMIT_EXCEEDED(9),
  59.  
  60. /**
  61. * The session key was invalid.
  62. */
  63. BAD_SESSION_ID(10),
  64.  
  65. /**
  66. * The password is too weak, and should be improved.
  67. */
  68. WEAK_PASSWORD(11),
  69.  
  70. /**
  71. * When trying to connect to a members world while being f2p.
  72. */
  73. MEMBERS_WORLD(12),
  74.  
  75. /**
  76. * Could not login.
  77. */
  78. COULD_NOT_LOGIN(13),
  79.  
  80. /**
  81. * The server is currently updating.
  82. */
  83. UPDATING(14),
  84.  
  85. /**
  86. * Too many incorrect login attempts from your address.
  87. */
  88. TOO_MANY_INCORRECT_LOGINS(16),
  89.  
  90. /**
  91. * When logging on a free world while standing in members area.
  92. */
  93. STANDING_IN_MEMBER(17),
  94.  
  95. /**
  96. * This account is locked as it might have been stolen.
  97. */
  98. LOCKED(18),
  99.  
  100. /**
  101. * When trying to use fullscreen to login on a free world.
  102. */
  103. FULLSCREEN_MEMBERS_ONLY(19),
  104.  
  105. /**
  106. * The login server connected to is invalid.
  107. */
  108. INVALID_LOGIN_SERVER(20),
  109.  
  110. /**
  111. * When the player's saved file exists, but is unable to be loaded.
  112. */
  113. ERROR_LOADING_PROFILE(24),
  114.  
  115. /**
  116. * This computer address is disabled as it was used to break our rules.
  117. */
  118. IP_BANNED(26);
  119.  
  120. /**
  121. * The value.
  122. */
  123. private final byte value;
  124.  
  125. /**
  126. * Constructs a new {@code ReturnCodes} {@code Object}.
  127. * @param value The value.
  128. */
  129. private ReturnCodes(int value) {
  130. this.value = (byte) value;
  131. }
  132.  
  133. /**
  134. * Gets the return code value.
  135. * @return The value.
  136. */
  137. public byte getValue() {
  138. return value;
  139. }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement