本文整理汇总了Java中net.minecraft.network.play.server.SPacketTitle.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java SPacketTitle.getMessage方法的具体用法?Java SPacketTitle.getMessage怎么用?Java SPacketTitle.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.play.server.SPacketTitle
的用法示例。
在下文中一共展示了SPacketTitle.getMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleTitle
import net.minecraft.network.play.server.SPacketTitle; //导入方法依赖的package包/类
@SuppressWarnings("incomplete-switch")
public void handleTitle(SPacketTitle packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
SPacketTitle.Type spackettitle$type = packetIn.getType();
String s = null;
String s1 = null;
String s2 = packetIn.getMessage() != null ? packetIn.getMessage().getFormattedText() : "";
switch (spackettitle$type)
{
case TITLE:
s = s2;
break;
case SUBTITLE:
s1 = s2;
break;
case RESET:
this.gameController.ingameGUI.displayTitle("", "", -1, -1, -1);
this.gameController.ingameGUI.setDefaultTitlesTimes();
return;
}
this.gameController.ingameGUI.displayTitle(s, s1, packetIn.getFadeInTime(), packetIn.getDisplayTime(), packetIn.getFadeOutTime());
}
示例2: handleTitle
import net.minecraft.network.play.server.SPacketTitle; //导入方法依赖的package包/类
@SuppressWarnings("incomplete-switch")
public void handleTitle(SPacketTitle packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
SPacketTitle.Type spackettitle$type = packetIn.getType();
String s = null;
String s1 = null;
String s2 = packetIn.getMessage() != null ? packetIn.getMessage().getFormattedText() : "";
switch (spackettitle$type)
{
case TITLE:
s = s2;
break;
case SUBTITLE:
s1 = s2;
break;
case ACTIONBAR:
this.gameController.ingameGUI.setRecordPlaying(s2, false);
return;
case RESET:
this.gameController.ingameGUI.displayTitle("", "", -1, -1, -1);
this.gameController.ingameGUI.setDefaultTitlesTimes();
return;
}
this.gameController.ingameGUI.displayTitle(s, s1, packetIn.getFadeInTime(), packetIn.getDisplayTime(), packetIn.getFadeOutTime());
}