public variable to enum in TitlePacket
This commit is contained in:
@@ -41,26 +41,26 @@ public class WrapperNetChannel implements NetChannel {
|
||||
@Override
|
||||
public void sendTitle(Title title) {
|
||||
Text text = title.getTitle();
|
||||
if (text != null) write(new TitlePacket(TitlePacket.SET_TITLE, text));
|
||||
if (text != null) write(new TitlePacket(TitlePacket.Action.SET_TITLE, text));
|
||||
|
||||
text = title.getSubtitle();
|
||||
if (text != null) write(new TitlePacket(TitlePacket.SET_SUBTITLE, text));
|
||||
if (text != null) write(new TitlePacket(TitlePacket.Action.SET_SUBTITLE, text));
|
||||
|
||||
text = title.getTextActionBar();
|
||||
if (text != null) write(new TitlePacket(TitlePacket.SET_ACTION_BAR, text));
|
||||
if (text != null) write(new TitlePacket(TitlePacket.Action.SET_ACTION_BAR, text));
|
||||
|
||||
Integer fadeIn = title.getFadeInTime();
|
||||
Integer stay = title.getStayTime();
|
||||
Integer fadeOut = title.getFadeOutTime();
|
||||
if (fadeIn != null && stay != null && fadeOut != null) {
|
||||
write(new TitlePacket(TitlePacket.SET_DISPLAY_TIME, fadeIn, stay, fadeOut));
|
||||
write(new TitlePacket(TitlePacket.Action.SET_DISPLAY_TIME, fadeIn, stay, fadeOut));
|
||||
}
|
||||
|
||||
Boolean bool = title.getHide();
|
||||
if (bool != null && bool) write(new TitlePacket(TitlePacket.HIDE));
|
||||
if (bool != null && bool) write(new TitlePacket(TitlePacket.Action.HIDE));
|
||||
|
||||
bool = title.getReset();
|
||||
if (bool != null && bool) write(new TitlePacket(TitlePacket.RESET));
|
||||
if (bool != null && bool) write(new TitlePacket(TitlePacket.Action.RESET));
|
||||
|
||||
flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user