#2457: Allow objects in with
to be translated into a string (for integer, float, etc.)
This commit is contained in:
@@ -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 );
|
||||
|
Reference in New Issue
Block a user