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)
|
||||
{
|
||||
_title = (title == null ? null
|
||||
: (title.length() > 2 && ChatColor.getLastColors(title.substring(0, 2)).length() == 0 ? ChatColor.WHITE : ""))
|
||||
+ title;
|
||||
if (title == null)
|
||||
{
|
||||
_title = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_title = ((title.length() > 2 && ChatColor.getLastColors(title.substring(0, 2)).length() == 0) ? ChatColor.WHITE : "") + title;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user