Temporarily change scoreboard headers for 1.13

This commit is contained in:
Dan Mulloy 2018-06-04 14:06:21 -04:00 committed by Alexander Meech
parent 201c285091
commit 9ee5527068
2 changed files with 15 additions and 6 deletions

View File

@ -4,7 +4,8 @@ public enum LineFormat
{ {
LORE(220), LORE(220),
PUNISHMENT_UI(48), PUNISHMENT_UI(48),
CHAT(319); CHAT(319),
SCOREBOARD(16);
private int _length; private int _length;

View File

@ -1,12 +1,16 @@
package mineplex.hub; package mineplex.hub;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
public class HubClient public class HubClient
{ {
private static final int DISPLAY_LENGTH = 16; private static final int DISPLAY_LENGTH = 16;
private String ScoreboardString; private String ScoreboardString;
private int ScoreboardIndex ; private int ScoreboardIndex;
public HubClient(String name) public HubClient(String name)
{ {
@ -15,13 +19,15 @@ public class HubClient
public void setName(String name) public void setName(String name)
{ {
ScoreboardString = " Welcome " + name + ", to the Mineplex Network!"; // TODO temporary until I figure out what's wrong with scoreboards on 1.13
ScoreboardIndex = 0; // ScoreboardString = " Welcome " + name + ", to the Mineplex Network!";
// ScoreboardIndex = 0;
ScoreboardString = UtilText.center(C.cGoldB + "MINE" + C.cDGrayB + "PLEX", LineFormat.SCOREBOARD);
} }
public String GetScoreboardText() public String GetScoreboardText()
{ {
if (ScoreboardString.length() <= DISPLAY_LENGTH) /* if (ScoreboardString.length() <= DISPLAY_LENGTH)
{ {
return ScoreboardString; return ScoreboardString;
} }
@ -35,6 +41,8 @@ public class HubClient
} }
ScoreboardIndex = (ScoreboardIndex + 1) % ScoreboardString.length(); ScoreboardIndex = (ScoreboardIndex + 1) % ScoreboardString.length();
return display; return display; */
return ScoreboardString;
} }
} }