Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
library:minedown:usage [2020/11/23 18:23] – [Artifact] Increment version phoenix616library:minedown:usage [2024/08/11 12:36] (current) – Update to focus on adventure phoenix616
Line 3: Line 3:
 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. 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.
  
-===== BungeeCord-chat API on Spigot =====+===== MineDown using Adventure (e.g. on Paper or Velocity) =====
  
 ```java ```java
-player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());+player.sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());
 ``` ```
 or with a static approach: or with a static approach:
 ```java ```java
-player.spigot().sendMessage(MineDown.parse(rawMessage, replacements));+player.sendMessage(MineDown.parse(rawMessage, replacements));
 ``` ```
  
-Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown/) for more+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. detailed info on the library and the included classes.
  
-===== kyori-adventure on Spigot =====+===== On Spigot using adventure-platform =====
  
 ```java ```java
Line 25: Line 27:
 BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, replacements)); BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, replacements));
 ``` ```
-Take a look at the [MineDown-adventure JavaDocs](https://docs.minebench.de/minedown-adventure/) for more+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 ===== 
 + 
 +```java 
 +player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); 
 +``` 
 +or with a static approach: 
 +```java 
 +player.spigot().sendMessage(MineDown.parse(rawMessage, replacements)); 
 +``` 
 + 
 +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 46: 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.7.0-SNAPSHOT</version>+        <version>1.7.3-SNAPSHOT</version>
         <scope>compile</scope>         <scope>compile</scope>
     </dependency>     </dependency>
Line 58: 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.2-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 ====