#2921: ClickEvent without value exceptions in window title
This commit is contained in:
parent
023f407b0d
commit
e93c762f16
@ -65,7 +65,7 @@ public class BaseComponentSerializer
|
|||||||
JsonObject event = object.getAsJsonObject( "clickEvent" );
|
JsonObject event = object.getAsJsonObject( "clickEvent" );
|
||||||
component.setClickEvent( new ClickEvent(
|
component.setClickEvent( new ClickEvent(
|
||||||
ClickEvent.Action.valueOf( event.get( "action" ).getAsString().toUpperCase( Locale.ROOT ) ),
|
ClickEvent.Action.valueOf( event.get( "action" ).getAsString().toUpperCase( Locale.ROOT ) ),
|
||||||
event.get( "value" ).getAsString() ) );
|
( event.has( "value" ) ) ? event.get( "value" ).getAsString() : "" ) );
|
||||||
}
|
}
|
||||||
if ( object.has( "hoverEvent" ) )
|
if ( object.has( "hoverEvent" ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user