Fix item builder to properly use null item titles
This commit is contained in:
parent
455e09a9da
commit
00d31ffad3
@ -400,9 +400,14 @@ public class ItemBuilder
|
|||||||
|
|
||||||
public ItemBuilder setTitle(String title)
|
public ItemBuilder setTitle(String title)
|
||||||
{
|
{
|
||||||
_title = (title == null ? null
|
if (title == null)
|
||||||
: (title.length() > 2 && ChatColor.getLastColors(title.substring(0, 2)).length() == 0 ? ChatColor.WHITE : ""))
|
{
|
||||||
+ title;
|
_title = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = ((title.length() > 2 && ChatColor.getLastColors(title.substring(0, 2)).length() == 0) ? ChatColor.WHITE : "") + title;
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user