geforkt von Mirrors/Paper
Don't pass null title to constructor
Fixes #83 Fix resetTitle() @Zbob750 shouldn't be doing these updates in the middle of the night
Dieser Commit ist enthalten in:
Ursprung
59ca434484
Commit
a8d725eb23
@ -100,26 +100,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void sendTitle(String title, String subtitle) {
|
||||
if (title != null) {
|
||||
- if (title != null) {
|
||||
- PacketPlayOutTitle packetTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE, CraftChatMessage.fromString(title)[0]);
|
||||
- getHandle().playerConnection.sendPacket(packetTitle);
|
||||
+ this.sendTitle(new Title(title)); // TODO: Paper - Double check these
|
||||
}
|
||||
|
||||
if (subtitle != null) {
|
||||
- }
|
||||
-
|
||||
- if (subtitle != null) {
|
||||
- PacketPlayOutTitle packetSubtitle = new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, CraftChatMessage.fromString(subtitle)[0]);
|
||||
- getHandle().playerConnection.sendPacket(packetSubtitle);
|
||||
+ this.sendTitle(new Title(null, subtitle)); // TODO: Paper - Double check these
|
||||
}
|
||||
- }
|
||||
+ Preconditions.checkNotNull(title, "Null title");
|
||||
+ this.sendTitle(new Title(title, subtitle));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTitle() {
|
||||
- PacketPlayOutTitle packetReset = new PacketPlayOutTitle(EnumTitleAction.RESET, null);
|
||||
- getHandle().playerConnection.sendPacket(packetReset);
|
||||
+ this.hideTitle(); // TODO: Paper - Double check these
|
||||
+ getHandle().playerConnection.sendPacket(new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.RESET, (BaseComponent[]) null, 0, 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren