API

You can use the nChat API to set custom nodes. Import nChat then make a listener that extends on the nChatEventListener. An example of the onChatFormatEvent:

	public void onChatFormat(ChatFormatEvent event){
		Node node = event.getNode("derp");

		node.setValue("herp");
	}

An example of using a PlayerChatFormatEvent:

	if (!(event instanceof PlayerChatFormatEvent)){
		return;
	}
		
	PlayerChatFormatEvent subEvent = (PlayerChatFormatEvent) event;
		
	Player player = subEvent.getPlayer();

Comments

Posts Quoted:
Reply
Clear All Quotes