File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change 1
1
# TextMU
2
- A small, Markdown inspired syntax for SpongeAPI
3
- _ This is a library, not a standalone plugin!_
2
+ A simple markup syntax for Sponge
3
+
4
+ [ ![ ] ( https://jitpack.io/v/dags-/TextMU.svg )] ( https://jitpack.io/#dags-/TextMU )
4
5
5
6
## Syntax
6
7
The syntax is similar to Markdown links:
@@ -24,5 +25,34 @@ Text actions are supported:
24
25
- HoverText - any other string that does not match the above (can include the MU syntax)
25
26
` [Mouse over me](this is a [hidden](italic) message!) `
26
27
27
- ## Example Code
28
+ ## Templates
29
+ TextMU incorporates a simple string templating engine which it can render to text.
30
+ You can read more about the template syntax and usage [ here] ( https://github.com/dags-/Template/blob/master/README.md )
31
+
32
+ ## Usage/Code Examples
33
+ #### Dependency:
34
+ ```
35
+ repositories {
36
+ maven { url "https://jitpack.io" }
37
+ }
38
+
39
+ dependencies {
40
+ compile "com.github.dags-:TextMU:0.3.0"
41
+ }
42
+ ```
43
+
44
+ #### Basic text rendering:
45
+ ```
46
+ Text text = MUSpec.global().render("Hello [World](blue)");
47
+ Sponge.getServer().getBroadcastChannel().send(text);
48
+ ```
49
+
50
+ #### Permission-based text rendering:
51
+ ```
52
+ Text text = MUSpec.global().render(player, "Hello [World!](green)");
53
+ Sponge.getServer().getBroadcastChannel().send(text);
54
+ ```
55
+ _ Here, the output text will only include colors/styles/actions that the player has permission to use_
56
+
57
+ #### Further examples
28
58
See the [ example plugin] ( https://github.com/dags-/TextMU/blob/master/src/test/java/ExamplePlugin.java )
You can’t perform that action at this time.
0 commit comments