Fix ItemStackBuilder#displayName method
This commit is contained in:
parent
5ab7b0e252
commit
83e35f21bd
@ -98,9 +98,10 @@ public class ItemStackBuilder {
|
|||||||
|
|
||||||
public ItemStackBuilder displayName(ComponentLike displayName) {
|
public ItemStackBuilder displayName(ComponentLike displayName) {
|
||||||
if (displayName != null) {
|
if (displayName != null) {
|
||||||
if (displayName.asComponent().style().decoration(TextDecoration.ITALIC) == State.NOT_SET)
|
Component cmp = displayName.asComponent();
|
||||||
((FormatableChat)displayName).italic(false);
|
if (cmp.style().decoration(TextDecoration.ITALIC) == State.NOT_SET)
|
||||||
return rawDisplayName(displayName.asComponent());
|
cmp.style().decoration(TextDecoration.ITALIC, State.FALSE);
|
||||||
|
return rawDisplayName(cmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return rawDisplayName(null);
|
return rawDisplayName(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user