Closed SquidDev closed 6 years ago
The username value in the the chat event is always nil.
chat
Tested on 1.11.2-1.0-build-T17.
This is due to this line: https://github.com/rolandoislas/PeripheralsPlusOne/blob/ac87f65879d7332f390cd6d0d200050c4dbc747d/src/main/java/com/austinv11/peripheralsplusplus/tiles/TileEntityChatBox.java#L77
It uses EntityPlayer.getDisplayName(), but that returns an ITextComponent which ComputerCraft will convert to null. One should probably call getUnformattedText on that (or use EntityPlayer.getDisplayNameString()).
EntityPlayer.getDisplayName()
ITextComponent
null
getUnformattedText
EntityPlayer.getDisplayNameString()
Description
The username value in the the
chat
event is always nil.Steps to Reproduce
Tested on 1.11.2-1.0-build-T17.
This is due to this line: https://github.com/rolandoislas/PeripheralsPlusOne/blob/ac87f65879d7332f390cd6d0d200050c4dbc747d/src/main/java/com/austinv11/peripheralsplusplus/tiles/TileEntityChatBox.java#L77
It uses
EntityPlayer.getDisplayName()
, but that returns anITextComponent
which ComputerCraft will convert tonull
. One should probably callgetUnformattedText
on that (or useEntityPlayer.getDisplayNameString()
).