Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
7473c6d
Create README.md
PeachesMLG Dec 22, 2020
a8a0d0e
Merge remote-tracking branch 'github/master'
PeachesMLG Dec 22, 2020
62023dd
Fixed issues with comparing colours
PeachesMLG Dec 22, 2020
6155a40
Update README.md
PeachesMLG Dec 22, 2020
9203353
Update README.md
PeachesMLG Dec 22, 2020
fb60289
Update README.md
PeachesMLG Dec 22, 2020
3949902
Made more methods private
PeachesMLG Dec 23, 2020
ca4a68d
Merge remote-tracking branch 'github/master'
PeachesMLG Dec 23, 2020
0c1da22
Optimised Regex
PeachesMLG Dec 23, 2020
a843d7c
1.0.1
PeachesMLG Dec 23, 2020
98b180c
Update README.md
PeachesMLG Dec 23, 2020
bfcb5b6
1.0.2
PeachesMLG Dec 26, 2020
2924a2b
Merge remote-tracking branch 'github/master'
PeachesMLG Dec 26, 2020
05624c3
Code cleanup
PeachesMLG Dec 26, 2020
9d9afc7
Changed ImmutableMap to Map
PeachesMLG Dec 26, 2020
f318caa
Mode Code Cleanup
PeachesMLG Dec 26, 2020
15fa04c
Update README.md
PeachesMLG Mar 1, 2021
cf9cad0
Added ability to translate multiple Strings
PeachesMLG Mar 1, 2021
6581487
Added Rainbow Pattern
PeachesMLG Mar 1, 2021
e47845f
Update README.md
PeachesMLG Mar 1, 2021
a45bbae
Update README.md
PeachesMLG Mar 1, 2021
537b9fb
1.0.3
PeachesMLG Mar 1, 2021
438feff
Merge remote-tracking branch 'origin/master'
PeachesMLG Mar 1, 2021
d48a4dd
Make code consistent
daspositioned Mar 2, 2021
0955044
Add & Improve documentation
daspositioned Mar 2, 2021
baa0dc1
Fix documentation formatting
daspositioned Mar 2, 2021
eedcd84
Use Gradle as build tool
daspositioned Mar 2, 2021
e83c8b8
Update documentation versions
daspositioned Mar 2, 2021
ba7da18
Unfix everything I just did
daspositioned Mar 2, 2021
f66a85a
Merge pull request #4 from dlsf/feature/documentation
PeachesMLG Mar 2, 2021
ad9dd9a
Merge pull request #5 from dlsf/feature/gradle
PeachesMLG Mar 5, 2021
48a5cde
Fixed Java docs
PeachesMLG Mar 7, 2021
eeae3ac
Fixed Java docs
PeachesMLG Mar 7, 2021
891ca33
Maven FTW
PeachesMLG Mar 7, 2021
36d1ab1
Maven FTW
PeachesMLG Mar 7, 2021
82819f1
Added support for Bold Underline ect
PeachesMLG Mar 7, 2021
d996ac0
Add color stripping method
daspositioned Jul 16, 2021
9bba6c1
Fix solid pattern replacement
daspositioned Jul 16, 2021
4bc1cb6
Remove unnecessary brackets
daspositioned Jul 16, 2021
5b752f5
Remove unnecessary capturing group
daspositioned Jul 16, 2021
1c65e99
Merge pull request #9 from Iridium-Development/feature/color-stripping
PeachesMLG Jul 16, 2021
9dbdc55
Add alternative solid pattern
daspositioned Jul 29, 2021
a019a0d
Merge pull request #10 from Iridium-Development/feature/alternative-s…
PeachesMLG Aug 2, 2021
518b2b9
Version Increment
PeachesMLG Aug 3, 2021
6b8db8e
Update README.md
PeachesMLG Oct 1, 2021
66746dd
Fix color stripping method
daspositioned Oct 4, 2021
cdbcabb
Fix <#HEX> stripping
daspositioned Oct 4, 2021
2859474
Remove IridiumColorAPI.iml
daspositioned Oct 4, 2021
732f636
Merge pull request #12 from Iridium-Development/fix/color-stripping
PeachesMLG Oct 26, 2021
a9b584f
Switch to Gradle & Add unit tests
daspositioned Oct 26, 2021
7b442ee
Fix color stripping test
daspositioned Oct 26, 2021
fa0e61f
Fix missing test cases
daspositioned Oct 26, 2021
a5f0103
Clean up build.gradle.kts
daspositioned Oct 26, 2021
d90dfa1
Small cleanup
daspositioned Oct 26, 2021
288c280
Changed Tests
PeachesMLG Oct 26, 2021
4b958d9
Merge pull request #13 from Iridium-Development/feature/gradle-and-tests
PeachesMLG Oct 26, 2021
aa70a8b
Version Increment
PeachesMLG Oct 26, 2021
0fb5ca6
Improve the indentation
daspositioned Nov 10, 2021
48a775a
Merge pull request #15 from Iridium-Development/improvement/indentation
PeachesMLG Nov 18, 2021
f9b4c74
Create gradle.yml
PeachesMLG Nov 18, 2021
f6042ee
The repository link is now correct
LIMPIX31 Nov 21, 2021
4756aeb
Merge pull request #16 from LIMPIX31/patch-1
PeachesMLG Nov 25, 2021
80f316c
Fix a problem where the API did not recognize already converted color…
Dec 14, 2021
54bd62d
Merge pull request #18 from boiscljo/master
PeachesMLG Dec 15, 2021
37f470c
Allow modifier to be applied to only parts of the text
Dec 15, 2021
9f994a6
Merge branch 'Iridium-Development:master' into master
Dec 15, 2021
7f6e3b9
Fix autoformatting and add testing
Dec 15, 2021
b2e7a45
Merge branch 'master' of github.com:boiscljo/IridiumColorAPI
Dec 15, 2021
5fa1e55
Gradient and rainbow test case
Dec 15, 2021
db20b5b
Remove the reassigning the parameters
Dec 15, 2021
1468c50
Remove the reassigning the parameters
Dec 15, 2021
e9b1c3f
Merge pull request #19 from boiscljo/master
PeachesMLG Dec 15, 2021
5a336cb
Weaken ::process(List<String>) to ::process(Collection<String>)
zofiaclient Jun 19, 2022
1520cf7
Merge pull request #24 from ImajinDevon/patch-1
PeachesMLG Jun 19, 2022
76a45ac
Create LICENCE
PeachesMLG Jan 14, 2023
bcf3d23
Merge pull request #27 from Iridium-Development/add-license-1
PeachesMLG Jan 14, 2023
f073a2d
Version Increment
PeachesMLG Sep 22, 2023
2c96813
Version Increment
PeachesMLG Sep 22, 2023
a35e121
Version Increment
PeachesMLG Sep 22, 2023
fa46dba
Updated it to use apache commons lang3
RedW0lfStoneYT Jan 1, 2024
a630889
Add bungeecord support, Improve IridiumColorAPI#apply
iiAhmedYT Jan 2, 2024
5d3b7a3
put back the old check for the tests to run
iiAhmedYT Jan 9, 2024
69b453f
fix a potential bug one day?
iiAhmedYT Jan 9, 2024
a8a07f5
Fix compiling issues for me
iiAhmedYT Jan 9, 2024
e0e7271
Version Increment: Merge pull request #30 from iiAhmedYT/master
PeachesMLG Jan 9, 2024
ad27bde
Version Increment
PeachesMLG Jan 9, 2024
8814046
fix: single char error
meteorOSS Feb 2, 2024
b5591b9
Merge pull request #31 from meteorOSS/master
PeachesMLG Feb 11, 2024
7efb663
Merge pull request #29 from RedW0lfStoneYT/master
PeachesMLG Feb 24, 2024
b405cd2
Version Increment
PeachesMLG Feb 24, 2024
46de237
strip the color formatting: §r
sj-hub9796 Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle
on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
steps:
- uses: actions/checkout@v3.0.0
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3.0.0
with:
distribution: temurin
java-version: 17
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Test with Gradle
run: ./gradlew test
- name: Build with Gradle
run: ./gradlew build
- name: Upload artifacts
uses: "actions/upload-artifact@v2.2.3"
with:
name: "IridiumColorAPI"
path: "build/libs/IridiumColorAPI-*.jar"
upload:
needs: build
runs-on: ubuntu-latest
if: "contains(github.event.commits[0].message, 'Version Increment')"
steps:
- uses: actions/checkout@v2
- uses: thecodemonkey/action-get-gradle-version@master
id: version
with:
file: "build.gradle.kts"
- uses: actions/download-artifact@v3.0.2
with:
name: "IridiumColorAPI"
path: "./"
- name: Publish to Nexus
uses: sonatype-nexus-community/nexus-repo-github-action@master
with:
serverUrl: "https://nexus.iridiumdevelopment.net/"
username: "${{ secrets.NEXUS_USERNAME }}"
password: "${{ secrets.NEXUS_PASSWORD }}"
format: "maven2"
repository: "maven-releases"
coordinates: "groupId=com.iridium artifactId=IridiumColorAPI version=${{steps.version.outputs.version}} generate-pom=on"
assets: "extension=jar"
filename: "IridiumColorAPI-*.jar"
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Project exclude paths
/target/
/.idea/
.gradle/
.idea/
build/
target/
2 changes: 0 additions & 2 deletions IridiumColorAPI.iml

This file was deleted.

674 changes: 674 additions & 0 deletions LICENCE

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# IridiumColorAPI

```xml
<repository>
<id>iridiumdevelopment</id>
<url>https://nexus.iridiumdevelopment.net/repository/maven-releases/</url>
</repository>
```
```xml
<dependency>
<groupId>com.iridium</groupId>
<artifactId>IridiumColorAPI</artifactId>
<version>LATEST</version>
</dependency>
```
# Usage
To add a gradient simply use the <GRADIENT> tags
```java
IridiumColorAPI.process("<GRADIENT:2C08BA>Cool string with a gradient</GRADIENT:028A97>");
```
![Gradient Text](https://i.imgur.com/M1l5OM9.png)

The number after the rainbow represents the saturation
```java
IridiumColorAPI.process("<RAINBOW1>THIS IS A REALLY COOL Rainbow</RAINBOW>");
```

![Rainbow](https://i.imgur.com/5GhSFo1.png)

```java
IridiumColorAPI.process("<RAINBOW100>THIS IS A REALLY COOL Rainbow</RAINBOW>");
```
![Rainbow](https://i.imgur.com/Rieftuz.png)
```java
IridiumColorAPI.process("<SOLID:FF0080>Cool RGB SUPPORT");
```
![RGB Text](https://i.imgur.com/IudqIpb.png)

If your server version is pre 1.16 it will map the color to the nearest supported value(This also works with gradient)
In the example above, it will map to &5 as this is the closest

![Legacy RGB](https://i.imgur.com/8RMmCAX.png)
43 changes: 43 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
plugins {
java
`maven-publish`
}

group = "com.iridium"
version = "1.0.9"
description = "IridiumColorAPI"
java.sourceCompatibility = JavaVersion.VERSION_1_8

repositories {
maven("https://repo.rosewooddev.io/repository/public/")
mavenCentral()
}

dependencies {
implementation("org.spigotmc:spigot:1.17.1")
implementation("org.apache.commons:commons-lang3:3.13.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
testImplementation("org.mockito:mockito-inline:4.0.0")
testImplementation("org.mockito:mockito-junit-jupiter:4.0.0")
}

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}

tasks {
build {
dependsOn(test)
}

test {
useJUnitPlatform()
setForkEvery(1)
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
234 changes: 234 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading