#2457: Allow objects in with to be translated into a string (for integer, float, etc.)

This commit is contained in:
Simon Chuu
2018-07-09 03:20:11 -04:00
committed by md_5
parent ab810744ec
commit 77b0a38c26
2 changed files with 5 additions and 5 deletions

View File

@@ -71,12 +71,12 @@ public final class TranslatableComponent extends BaseComponent
List<BaseComponent> temp = new ArrayList<BaseComponent>();
for ( Object w : with )
{
if ( w instanceof String )
{
temp.add( new TextComponent( (String) w ) );
} else
if ( w instanceof BaseComponent )
{
temp.add( (BaseComponent) w );
} else
{
temp.add( new TextComponent( String.valueOf( w ) ) );
}
}
setWith( temp );