Skip to content

TubMC/TextComponents-Adventure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextComponents [Adventure Edition]

A simple TextComponents implementation that provides support for Adventure

Why?

I understand how pointless this seems, making a text implementation work on text implementation built on other text implementations is frankly dumb. However, this implementation reduces the amount of repeat work I will have to complete to support adventure compatible server software.

Implementation Specific Methods

The following methods are added to all IComponents in this implementation:

Name Parameters Return Type Function
asComponent Component Calls toAdventure, provided for the interface ComponentLike
toAdventure Component Unwraps the component into it's adventure counterpart
sendTo Audience Sends the message onto the audience's chat
sendAsActionBarTo Audience Sends the message onto the audience's actionbars

Installation

TextComponents is available on Maven from either the Official Maven Repository or JitPack

Official Repository

The latest version is hosted on an Official Maven Repository

First include the repository:

<repository>
  <id>bb1-repository-releases</id>
  <name>BradBot_1's Repository</name>
  <url>https://repo.bb1.fun/releases</url>
</repository>

Then add the dependency:

<dependency>
  <groupId>com.tubmc</groupId>
  <artifactId>text-components-adventure</artifactId>
  <version>1.0.0</version>
</dependency>

Jitpack

If the official repository is down or you choose not to trust it you can always pull it from JitPack

First include the repository:

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

Then add the dependency:

<dependency>
  <groupId>com.github.BradBot1</groupId>
  <artifactId>text-components-adventure</artifactId>
  <version>LATEST</version>
</dependency>

Local Installation

Just run the following commands:

git clone https://github.com/TubMC/TextComponents-Adventure.git
cd TextComponents-Adventure
mvn clean install

It will then be accessible from your local Maven Repoistory

Now you can simply add the following dependency without a repository:

<dependency>
  <groupId>com.tubmc</groupId>
  <artifactId>text-components-adventure</artifactId>
  <version>1.0.0</version>
</dependency>

About

A general implementation of TextComponents for Adventure

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages