Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. package org.nr.rs2.world.content.quests;
  2.  
  3. public enum QuestState {
  4.    
  5.     NOT_STARTED(255 << 10 | 0 << 5 | 0),
  6.     STARTED((255 << 10 | 255 << 5 | 0)),
  7.     COMPLETED((0 << 10 | 255 << 5 | 0)),
  8.    
  9.     ;
  10.     private int color;
  11.     QuestState(int color){
  12.     this.color = color;
  13.     }
  14.    
  15.     public static int getColor(int state) {
  16.     for (QuestState quest : values()) {
  17.         if (quest.ordinal() == state) {
  18.         return quest.color;
  19.         }
  20.     }
  21.     return NOT_STARTED.color;
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement