mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix title swapping fadeIn and stay
This commit is contained in:
parent
2fffeb4a36
commit
b154b7f941
2 changed files with 3 additions and 3 deletions
|
@ -1445,7 +1445,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b));
|
- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b));
|
||||||
- }
|
- }
|
||||||
+ if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
+ if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||||
+ joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure
|
+ joinMessage = PaperAdventure.asVanilla(jm); // Paper - Adventure
|
||||||
+ server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure
|
+ server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -2225,7 +2225,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ final PlayerConnection connection = this.getHandle().playerConnection;
|
+ final PlayerConnection connection = this.getHandle().playerConnection;
|
||||||
+ final net.kyori.adventure.title.Title.Times times = title.times();
|
+ final net.kyori.adventure.title.Title.Times times = title.times();
|
||||||
+ if (times != null) {
|
+ if (times != null) {
|
||||||
+ connection.sendPacket(new PacketPlayOutTitle(ticks(times.fadeIn()), ticks(times.fadeOut()), ticks(times.stay())));
|
+ connection.sendPacket(new PacketPlayOutTitle(ticks(times.fadeIn()), ticks(times.stay()), ticks(times.fadeOut())));
|
||||||
+ }
|
+ }
|
||||||
+ final PacketPlayOutTitle sp = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, null);
|
+ final PacketPlayOutTitle sp = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, null);
|
||||||
+ sp.adventure$text = title.subtitle();
|
+ sp.adventure$text = title.subtitle();
|
||||||
|
|
|
@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||||
joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure
|
joinMessage = PaperAdventure.asVanilla(jm); // Paper - Adventure
|
||||||
- server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure
|
- server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure
|
||||||
+ // Paper start - Removed sendAll for loop and broadcasted to console also
|
+ // Paper start - Removed sendAll for loop and broadcasted to console also
|
||||||
+ server.getPlayerList().sendMessage(joinMessage); // Paper - Adventure
|
+ server.getPlayerList().sendMessage(joinMessage); // Paper - Adventure
|
||||||
|
|
Loading…
Reference in a new issue