Skip to content

Commit 9ca5c87

Browse files
committed
Full rewrite
1 parent 47f19cb commit 9ca5c87

120 files changed

Lines changed: 7032 additions & 3698 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- name: Set up JDK
1717
uses: actions/setup-java@v2
1818
with:
19-
distribution: "adopt"
20-
java-version: "17"
19+
distribution: "temurin"
20+
java-version: "21"
2121

2222
- name: Make gradlew executable
2323
run: chmod +x gradlew
@@ -28,5 +28,8 @@ jobs:
2828
- name: Archive artifacts
2929
uses: actions/upload-artifact@v4
3030
with:
31-
name: geyser-voice-artifact
32-
path: build/libs/
31+
name: geyser-voice-artifacts
32+
path: |
33+
modules/paper/build/libs/
34+
modules/velocity/build/libs/
35+
modules/bungeecord/build/libs/

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
- name: Set up JDK
2525
uses: actions/setup-java@v2
2626
with:
27-
distribution: "adopt"
28-
java-version: "17"
27+
distribution: "temurin"
28+
java-version: "21"
2929

3030
- name: Make gradlew executable
3131
run: chmod +x gradlew
@@ -36,8 +36,11 @@ jobs:
3636
- name: Archive artifacts
3737
uses: actions/upload-artifact@v4
3838
with:
39-
name: geyser-voice-artifact
40-
path: build/libs/
39+
name: geyser-voice-artifacts
40+
path: |
41+
modules/paper/build/libs/
42+
modules/velocity/build/libs/
43+
modules/bungeecord/build/libs/
4144
4245
publish_release:
4346
name: Publish release
@@ -54,8 +57,8 @@ jobs:
5457
- name: Download artifacts
5558
uses: actions/download-artifact@v4
5659
with:
57-
name: geyser-voice-artifact
58-
path: build/libs/
60+
name: geyser-voice-artifacts
61+
path: release-artifacts/
5962

6063
- name: Create release
6164
if: github.event.inputs.status == 'stable'
@@ -64,7 +67,7 @@ jobs:
6467
prerelease: false
6568
tag: ${{ github.event.inputs.tag }}
6669
artifacts: |
67-
build/libs/GeyserVoice-*.jar
70+
release-artifacts/**/*.jar
6871
env:
6972
GITHUB_REPOSITORY: AvionBlock/GeyserVoice
7073

@@ -75,7 +78,7 @@ jobs:
7578
prerelease: true
7679
tag: ${{ github.event.inputs.tag }}
7780
artifacts: |
78-
build/libs/GeyserVoice-*.jar
81+
release-artifacts/**/*.jar
7982
env:
8083
GITHUB_REPOSITORY: AvionBlock/GeyserVoice
8184

@@ -86,10 +89,10 @@ jobs:
8689
with:
8790
name: GeyserVoice ${{ github.event.inputs.tag }}
8891
project_id: WtPu56Wa
89-
loaders: paper, spigot, bukkit, purpur, velocity, bungeecord
92+
loaders: paper, purpur, velocity, bungeecord
9093
game_versions: 1.20.2:1.21.10
9194
version_number: ${{ github.event.inputs.tag }}
9295
featured: ${{ github.event.inputs.status == 'stable' }}
9396
version_type: ${{ github.event.inputs.status == 'stable' && 'release' || 'beta' }}
9497
files: |
95-
./build/libs/GeyserVoice-*.jar
98+
./release-artifacts/**/*.jar

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,4 @@ nbdist/
236236
# End of https://www.gitignore.io/api/git,java,maven,eclipse,netbeans,jetbrains+all,visualstudiocode
237237

238238
### Gradle ###
239-
.gradle
239+
.gradle*

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
## GeyserVoice - Minecraft Proximity Voice Chat Plugin
22

3-
GeyserVoice is a Java plugin designed to enhance the multiplayer gaming experience on Minecraft servers by integrating the [VoiceCraft](https://github.com/SineVector241/VoiceCraft-MCBE_Proximity_Chat/) Proximity Chat application. The plugin facilitates cross-platform communication, allowing players on both Java and Bedrock editions to seamlessly engage in proximity-based voice conversations.
3+
GeyserVoice is a Java-side bridge for VoiceCraft built around `McApi TCP`. It now ships dedicated runtimes for `Paper`, `Velocity`, and `BungeeCord`, with direct Paper mode and proxy-relay mode for multi-server networks.
44

55
### Features
66

7-
- Cross-Platform Communication:
8-
GeyserVoice bridges the gap between Minecraft Java Edition and Bedrock Edition, enabling players on different platforms to communicate through the VoiceCraft Proximity Chat system.
9-
10-
- Immersive Proximity Chat:
11-
Experience a more immersive and realistic gameplay environment with proximity-based voice chat. Engage in conversations with nearby players, enhancing teamwork and coordination.
7+
- `McApi TCP` transport only for VoiceCraft communication
8+
- managed VoiceCraft runtime download/startup on direct Paper servers
9+
- proxy relay mode for `Velocity` and `BungeeCord`
10+
- server-side positioning updates from each Paper backend through the proxy
1211

1312
### How It Works
1413

15-
Installation: Simply install the GeyserVoice plugin on your Minecraft Java server. Make sure to follow the setup instructions to integrate it seamlessly with the VoiceCraft Proximity Chat application.
14+
Direct Paper mode:
15+
- install GeyserVoice on the Paper server
16+
- let the plugin download/start VoiceCraft locally if desired
17+
- the Paper plugin connects to VoiceCraft over `McApi TCP`
18+
19+
Proxy mode:
20+
- install GeyserVoice on each Paper backend and on the proxy
21+
- enable `config.server-behind-proxy: true` on the Paper backends
22+
- the proxy plugin owns the VoiceCraft connection
23+
- backend Paper servers stream player snapshots to the proxy through plugin messages
1624

1725
### Getting Started
1826

@@ -26,6 +34,8 @@ We welcome contributions from the community to improve and expand the functional
2634

2735
GeyserVoice is licensed under the MIT License. Feel free to use, modify, and distribute the plugin in accordance with the terms of the license.
2836

29-
### Proxy server support
37+
### Status
3038

31-
GeyserVoice also supports usage with Velocity and Bungeecord networks. Just install the .jar on your proxy server and on your paper server(s). Be sure to edit the config of the paper server(s) to set `server-behind-proxy` to `true` and then reload using `voice reload`. P.s. You don't need to set the server address, port and keys on the paper server(s), this is only needed on the proxy server.
39+
Current supported runtime paths:
40+
- `Paper -> McApi TCP -> VoiceCraft`
41+
- `Paper -> Proxy relay -> McApi TCP -> VoiceCraft`

build.gradle

Lines changed: 50 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,67 @@
11
plugins {
2-
id 'java'
3-
id 'io.github.goooler.shadow' version '8.1.8'
4-
id 'net.kyori.blossom' version '2.1.0'
2+
id 'base'
53
}
64

7-
group = 'io.greitan'
8-
version = project.hasProperty('VERSION') ? project.VERSION : 'UNKNOWN'
9-
description = "Plugin that adds support for using VoiceCraft on Java servers."
5+
group = 'team.avion'
6+
version = project.hasProperty('VERSION') ? project.VERSION : '0.1.0-SNAPSHOT'
7+
description = 'Plugin that adds support for using VoiceCraft on Java servers.'
108

11-
repositories {
12-
mavenCentral()
13-
maven {
14-
name = "CodeMC"
15-
url = uri("https://repo.codemc.io/repository/maven-public/")
16-
}
17-
maven {
18-
name = "PaperMC"
19-
url = "https://repo.papermc.io/repository/maven-public/"
20-
}
21-
maven {
22-
name = "PlaceholderAPI"
23-
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
24-
}
25-
maven {
26-
name = "Jitpack"
27-
url = 'https://jitpack.io'
28-
}
29-
maven {
30-
name = "Bungeecord"
31-
url 'https://oss.sonatype.org/content/repositories/snapshots'
32-
}
9+
ext {
10+
pluginName = 'GeyserVoice'
11+
pluginUrl = 'https://geyservoice.avion.team'
12+
pluginAuthor = 'lil-jon-crunk'
13+
javaTarget = JavaVersion.VERSION_21
14+
voiceCraft = [
15+
githubRepository : 'AvionBlock/VoiceCraft',
16+
release : 'latest',
17+
installDirectory : 'voicecraft-runtime',
18+
executableBaseName : 'VoiceCraft.Server',
19+
protocolMajor : 1,
20+
protocolMinor : 6,
21+
protocolPatch : 0
22+
]
3323
}
3424

35-
dependencies {
36-
compileOnly 'dev.folia:folia-api:1.20.2-R0.1-SNAPSHOT'
37-
compileOnly 'io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT'
38-
compileOnly 'com.velocitypowered:velocity-api:3.3.0-SNAPSHOT'
39-
annotationProcessor 'com.velocitypowered:velocity-api:3.3.0-SNAPSHOT'
40-
compileOnly 'net.md-5:bungeecord-api:1.20-R0.2'
41-
42-
compileOnly 'me.clip:placeholderapi:2.11.6'
43-
compileOnly 'org.projectlombok:lombok:1.18.30'
44-
annotationProcessor 'org.projectlombok:lombok:1.18.30'
45-
46-
implementation('com.fasterxml.jackson.core:jackson-databind:2.15.2')
47-
implementation('com.fasterxml.jackson.core:jackson-core:2.15.2')
48-
implementation("com.github.simplix-softworks:simplixstorage:3.2.3")
49-
}
25+
allprojects {
26+
group = rootProject.group
27+
version = rootProject.version
5028

51-
sourceSets {
52-
main {
53-
blossom {
54-
javaSources {
55-
property("name", "GeyserVoice")
56-
property("version", version.toString())
57-
property("description", description)
58-
property("url", "https://uninode.de")
59-
}
60-
resources {
61-
property("name", "GeyserVoice")
62-
property("version", version.toString())
63-
property("description", description)
64-
property("url", "https://uninode.de")
65-
}
29+
repositories {
30+
mavenCentral()
31+
maven {
32+
name = "PaperMC"
33+
url = uri("https://repo.papermc.io/repository/maven-public/")
34+
}
35+
maven {
36+
name = "PlaceholderAPI"
37+
url = uri("https://repo.extendedclip.com/releases/")
38+
}
39+
maven {
40+
name = "Bungeecord"
41+
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
6642
}
6743
}
6844
}
6945

70-
tasks.withType(JavaCompile) {
71-
options.encoding = 'UTF-8'
72-
}
73-
74-
tasks.withType(Javadoc) {
75-
options.encoding = 'UTF-8'
76-
options.charSet = 'UTF-8'
77-
}
46+
subprojects {
47+
apply plugin: 'java-library'
7848

79-
tasks.withType(Test) {
80-
systemProperty 'file.encoding', 'UTF-8'
81-
}
82-
83-
java {
84-
sourceCompatibility = JavaVersion.VERSION_17
85-
targetCompatibility = JavaVersion.VERSION_17
86-
}
49+
java {
50+
sourceCompatibility = rootProject.ext.javaTarget
51+
targetCompatibility = rootProject.ext.javaTarget
52+
withSourcesJar()
53+
}
8754

88-
shadowJar {
89-
archiveClassifier.set('all')
90-
relocate 'com.tcoded.folialib', 'io.greitan.avion.folialib'
91-
}
55+
tasks.withType(JavaCompile).configureEach {
56+
options.encoding = 'UTF-8'
57+
}
9258

93-
task deleteUnusableJar(type: Delete) {
94-
doLast {
95-
file("build/libs").listFiles().each { File file ->
96-
if (file.name.endsWith(".jar") && !file.name.contains("-all")) {
97-
file.delete()
98-
}
99-
}
59+
tasks.withType(Javadoc).configureEach {
60+
options.encoding = 'UTF-8'
61+
options.charSet = 'UTF-8'
10062
}
101-
}
10263

103-
task copyToTestServer(type: Copy) {
104-
from shadowJar
105-
into "D:\\JavaTest\\plugins"
64+
tasks.withType(Test).configureEach {
65+
systemProperty 'file.encoding', 'UTF-8'
66+
}
10667
}
107-
copyToTestServer.dependsOn shadowJar
108-
109-
build.finalizedBy shadowJar
110-
shadowJar.finalizedBy deleteUnusableJar
111-
if (project.hasProperty('DEV')) shadowJar.finalizedBy copyToTestServer

gradle/wrapper/gradle-wrapper.jar

5.26 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)