|
|
Mechanic: JSON Message
|
|
|
======================
|
|
|
|
|
|
Sends a json-format chat message to the target player(s). JSON-messages
|
... | ... | @@ -34,21 +33,21 @@ Examples |
|
|
You can use both bukkit color codes or json color formatting:
|
|
|
|
|
|
![](http://fs5.directupload.net/images/160309/u3fdf5cx.jpg)
|
|
|
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&aHey, i am a JSON message!'}]"} @trigger ~onInteract
|
|
|
- jsonmessage{m="[{'text':'Hey, i am a red JSON message!','color':'red'}]"} @trigger ~onInteract
|
|
|
|
|
|
```yaml
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&aHey, i am a JSON message!'}]"} @trigger ~onInteract
|
|
|
- jsonmessage{m="[{'text':'Hey, i am a red JSON message!','color':'red'}]"} @trigger ~onInteract
|
|
|
```
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
Here's an example of how to make use of hover-events:
|
|
|
|
|
|
<img src="http://fs5.directupload.net/images/160309/7irfoune.jpg" width="500" height="30" alt="http://fs5.directupload.net/images/160309/7irfoune.jpg" />
|
|
|
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&7With me, you can create hover events','hoverEvent':{'action':'show_text','value':{'text':'&aI am a hover event :)'}}}]"} @trigger ~onInteract
|
|
|
|
|
|
```yaml
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&7With me, you can create hover events','hoverEvent':{'action':'show_text','value':{'text':'&aI am a hover event :)'}}}]"} @trigger ~onInteract
|
|
|
```
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
And click events can be created like this. This is especially useful for
|
... | ... | @@ -57,6 +56,7 @@ would send the signal <signal> to the mob casting the json-message |
|
|
mechanic, if the player clicks on the click-event.
|
|
|
|
|
|
![](http://fs5.directupload.net/images/160309/gjxvhpd8.jpg)
|
|
|
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&7&nAlso click events! :)','clickEvent':{'action':'run_command','value':'/mm signal <mob.uuid> <signal>'}}]"} @trigger ~onInteract |
|
|
\ No newline at end of file |
|
|
```yaml
|
|
|
Skills:
|
|
|
- jsonmessage{m="[{'text':'&7&nAlso click events! :)','clickEvent':{'action':'run_command','value':'/mm signal <mob.uuid> <signal>'}}]"} @trigger ~onInteract
|
|
|
``` |
|
|
\ No newline at end of file |