3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 08:10:11 +01:00

Fix potential NPE

Dieser Commit ist enthalten in:
AJ Ferguson 2024-04-30 18:05:46 -04:00
Ursprung 255835438d
Commit aff7d2cf35

Datei anzeigen

@ -85,7 +85,7 @@ public class AnvilContainer extends Container {
session.sendDownstreamGamePacket(renameItemPacket); session.sendDownstreamGamePacket(renameItemPacket);
} else { } else {
// Restore formatting for item since we're not renaming // Restore formatting for item since we're not renaming
correctRename = MessageTranslator.convertMessage(originalName, session.locale()); correctRename = originalName != null ? MessageTranslator.convertMessage(originalName, session.locale()) : "";
// Java Edition sends the original custom name when not renaming, // Java Edition sends the original custom name when not renaming,
// if there isn't a custom name an empty string is sent // if there isn't a custom name an empty string is sent
ServerboundRenameItemPacket renameItemPacket = new ServerboundRenameItemPacket(plainOriginalName); ServerboundRenameItemPacket renameItemPacket = new ServerboundRenameItemPacket(plainOriginalName);