package markehme.factionsplus.scoreboard;

import markehme.factionsplus.MCore.FPUConf;

public enum CurrentScoreboard {
	
	Power(1), Money(2), Members(3), Land(4);
	
	CurrentScoreboard(int id) {
		this.id = id;
	}
	
	int id = 0;
	
	public CurrentScoreboard getNext(FPUConf fpuconf) {
		if(this.id == 1) return Money.get(fpuconf);
		if(this.id == 2) return Members.get(fpuconf);
		if(this.id == 3) return Land.get(fpuconf);
		if(this.id == 4) return Power.get(fpuconf);
		
		return null;
	}
	
	public CurrentScoreboard get(FPUConf fpuconf) {
		if(fpuconf.scoreboardRotates.containsKey(this)) {
			if(fpuconf.scoreboardRotates.get(this)) {
				return this;
			}
		}
		
		return this.getNext(fpuconf);
	}
	
}

@@ -116,16 +116,25 @@
 rd %7B%0A%09%0A%09
+None(0), 
 Power(1)
@@ -166,16 +166,16 @@
 and(4);%0A
-
 %09%0A%09Curre
@@ -282,24 +282,80 @@
  fpuconf) %7B%0A
+%09%09if(this.id == 0) return fpuconf.scoreboardDefault;%0A%09%09%0A
 %09%09if(this.id
@@ -543,12 +543,13 @@
 urn 
-null
+Power
 ;%0A%09%7D

Adding CurrentScoreboard.None