Expand CustomClickEvent to have raw and parsed data
This commit is contained in:
@@ -394,12 +394,20 @@ public class UpstreamBridge extends PacketHandler
|
||||
for ( String line : lines )
|
||||
{
|
||||
String[] split = line.split( "\t", 2 );
|
||||
parsed.put( split[0], ( split.length > 1 ) ? split[1] : "" );
|
||||
if ( split.length > 1 )
|
||||
{
|
||||
parsed.put( split[0], split[1] );
|
||||
}
|
||||
}
|
||||
data = parsed.buildOrThrow();
|
||||
|
||||
if ( data.isEmpty() )
|
||||
{
|
||||
data = null;
|
||||
}
|
||||
data = parsed.build();
|
||||
}
|
||||
|
||||
CustomClickEvent event = new CustomClickEvent( con, customClickAction.getId(), data );
|
||||
CustomClickEvent event = new CustomClickEvent( con, customClickAction.getId(), customClickAction.getData(), data );
|
||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||
{
|
||||
throw CancelSendSignal.INSTANCE;
|
||||
|
Reference in New Issue
Block a user