Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
library:minedown:usage [2020/09/15 14:22] – [Artifact] Add info about velocity phoenix616library:minedown:usage [2024/08/11 12:36] (current) – Update to focus on adventure phoenix616
Line 1: Line 1:
 ====== How to use it ====== ====== How to use it ======
  
-The library's main API access is through the [MineDown.class](https://docs.minebench.de/minedown/de/themoep/minedown/MineDown.html) and its parse methods.+The library's main API access is through the [MineDown.class](https://docs.phoenix616.dev/minedown/de/themoep/minedown/MineDown.html) and its parse methods. 
 + 
 +===== MineDown using Adventure (e.g. on Paper or Velocity) ===== 
 + 
 +```java 
 +player.sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); 
 +``` 
 +or with a static approach: 
 +```java 
 +player.sendMessage(MineDown.parse(rawMessage, replacements)); 
 +``` 
 + 
 +This is possible on any platform that implements the [Adventure Component API](https://github.com/KyoriPowered/adventure)! 
 + 
 +Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown-adventure/) for more 
 +detailed info on the library and the included classes. 
 + 
 +===== On Spigot using adventure-platform ===== 
 + 
 +```java 
 +BukkitAudiences.create(plugin).player(player).sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); 
 +``` 
 +or with a static approach: 
 +```java 
 +BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, replacements)); 
 +``` 
 +Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown-adventure/) for more 
 +detailed info on the library and the included classes. 
 + 
 +===== Legacy BungeeCord-chat API on Spigot =====
  
-E.g. you can use it like this in your Spigot plugin: 
 ```java ```java
 player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());
Line 12: Line 40:
 ``` ```
  
-Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown/) for more+Take a look at the [MineDown Legacy JavaDocs](https://docs.minebench.de/minedown/) for more
 detailed info on the library and the included classes. detailed info on the library and the included classes.
  
Line 33: Line 61:
 ==== Artifact ==== ==== Artifact ====
  
-To be used with bungeecord-chat in BungeeCord and Spigot-based servers:+=== Adventure === 
 + 
 +For usage in any platform that is supported by [kyori-adventure](https://github.com/KyoriPowered/adventure)/has an [adventure-platform adapter](https://github.com/KyoriPowered/adventure-platform):
 ```xml ```xml
 <dependencies> <dependencies>
     <dependency>     <dependency>
         <groupId>de.themoep</groupId>         <groupId>de.themoep</groupId>
-        <artifactId>minedown</artifactId> +        <artifactId>minedown-adventure</artifactId> 
-        <version>1.6.1-SNAPSHOT</version>+        <version>1.7.3-SNAPSHOT</version>
         <scope>compile</scope>         <scope>compile</scope>
     </dependency>     </dependency>
Line 45: Line 75:
 ``` ```
  
-For usage in any platform that is supported by [kyori-adventure](https://github.com/KyoriPowered/adventure):+Please note that on platforms that don't implement Adventure themselves (e.g. Spigot or Bungee) you need to provide an [adventure platform library](https://github.com/KyoriPowered/adventure-platformyourself in that case. (Both Paper and Velocity provide adventure) 
 + 
 +=== Legacy === 
 + 
 +Legacy version to be used with bungeecord-chat in BungeeCord and Spigot-based servers:
 ```xml ```xml
 <dependencies> <dependencies>
     <dependency>     <dependency>
         <groupId>de.themoep</groupId>         <groupId>de.themoep</groupId>
-        <artifactId>minedown-adventure</artifactId> +        <artifactId>minedown</artifactId> 
-        <version>1.6.1-SNAPSHOT</version>+        <version>1.7.1-SNAPSHOT</version>
         <scope>compile</scope>         <scope>compile</scope>
     </dependency>     </dependency>
 </dependencies> </dependencies>
 ``` ```
-Please note that you need to provide an [adventure platform library](https://github.com/KyoriPowered/adventure-platform) yourself in that case. (Unless you are on Velocity or some other server which provides it)+ 
 +<box red>⚠️ Please note that usage of bungeecord-chat is deprecated and that only the adventure implementation will receive new features going forward!</box>
  
 ==== Relocation ==== ==== Relocation ====