mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix potential NPE
This commit is contained in:
parent
255835438d
commit
aff7d2cf35
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ public class AnvilContainer extends Container {
|
|||
session.sendDownstreamGamePacket(renameItemPacket);
|
||||
} else {
|
||||
// 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,
|
||||
// if there isn't a custom name an empty string is sent
|
||||
ServerboundRenameItemPacket renameItemPacket = new ServerboundRenameItemPacket(plainOriginalName);
|
||||
|
|
Loading…
Reference in a new issue