Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a45ff2a
start on rewriting the linking server to be a plugin
onebeastchris Jan 5, 2025
3128689
tidy up commands
onebeastchris Jan 9, 2025
d8812ad
Code cleanup, add info command to display current link info
onebeastchris Jan 10, 2025
35877c6
Add util options
rtm516 Jan 10, 2025
dadcf6b
Fix build
rtm516 Jan 10, 2025
a990a70
Disable recipes and players in ping
rtm516 Jan 11, 2025
510b462
Drop util config and move more to plugin
rtm516 Jan 13, 2025
17a4656
more fixes, remove gson, other fixes
onebeastchris Jan 16, 2025
40793f0
add readme warning
onebeastchris Jan 16, 2025
e272a97
fix motd, crop trampling
onebeastchris Jan 17, 2025
becd093
only allow using link/unlink/link info commands
onebeastchris Jan 17, 2025
a890709
add custom help command
onebeastchris Jan 17, 2025
31e40a9
Show all commands to OPs and remove old recipie code
rtm516 Jan 17, 2025
4cf344a
Fix link command code argument
rtm516 Jan 17, 2025
90ecbd2
Run kick on main thread
rtm516 Jan 17, 2025
6571d42
lookup links from bedrock players in the DB as opposed to letting flo…
onebeastchris Jan 17, 2025
8053995
Kick players after 5 mins
rtm516 Jan 17, 2025
c326378
Reorganized the project
Tim203 Jan 18, 2025
8ea5760
Kick only idle when no link request, send message on link req replace
Tim203 Jan 18, 2025
3e33f4a
Add spawn location to the config
Tim203 Jan 19, 2025
c7de248
Make max pool size configurable
Tim203 Jan 19, 2025
4562e0d
Add max pool size to default config too
Tim203 Jan 19, 2025
9644c9c
Use a cached thread pool for the database instead
Tim203 Jan 19, 2025
d4415e0
Cancel all damage for players
Tim203 Jan 19, 2025
acf0853
Only teleport when damage cause is void
Tim203 Jan 19, 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
25 changes: 7 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: temurin

- name: Build
Expand All @@ -27,23 +27,12 @@ jobs:
arguments: build
cache-read-only: ${{ github.ref_name != 'master' && github.ref_name != 'development' }}

- name: Build image
if: ${{ github.repository == 'GeyserMC/GlobalLinkServer' && github.ref_name == 'master' }}
run: docker build . -t $IMAGE_NAME --label "run-number=${GITHUB_RUN_ID}"
- name: Registry login
if: ${{ github.repository == 'GeyserMC/GlobalLinkServer' && github.ref_name == 'master' }}
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
if: ${{ github.repository == 'GeyserMC/GlobalLinkServer' && github.ref_name == 'master' }}
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=latest

echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Archive Artifacts
uses: GeyserMC/actions/upload-multi-artifact@master
if: success()
with:
artifacts: |
GlobalLinkPlugin:build/libs/GlobalLinkPlugin.jar

- name: Notify Discord
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/GlobalLinkServer' }}
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2021-2024 GeyserMC
Copyright (c) 2021-2025 GeyserMC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# GlobalLinkServer Plugin

> [!IMPORTANT]
> This repo contains the code for the Geyser Global Linking Server plugin.
> If you want to just link your account, join link.geysermc.org on Minecraft Java or Bedrock.
> For more information visit https://link.geysermc.org/

### `server.properties`
```properties
allow-nether=false
generate-structures=false
generator-settings={"biome"\:"minecraft\:the_void","layers"\:[{"block"\:"minecraft\:air","height"\:1}]}
level-type=minecraft\:flat
spawn-protection=200
```

### `spigot.yml`
```yaml
commands:
send-namespaced: false
```


### `bukkit.yml`
```yaml
settings:
allow-end: false
```

47 changes: 24 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
plugins {
application
alias(libs.plugins.indra)
alias(libs.plugins.indra.licenser.spotless)
alias(libs.plugins.paperweight)
alias(libs.plugins.runpaper)
}

group = "org.geysermc.globallinkserver"

dependencies {
implementation(libs.gson) // newer version required for record support
implementation(libs.fastutil.common)
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")

implementation(libs.bundles.protocol)
implementation(libs.mcprotocollib) {
exclude("io.netty", "netty-all")
}

// mcprotocollib won't work without this
implementation(libs.netty.handler)

implementation(libs.adventure.text.legacy)
compileOnly(libs.floodgate.api)
implementation(libs.mariadb.client)
implementation(libs.bundles.fastutil)

compileOnly(libs.checker.qual)
}

application {
mainClass.set("org.geysermc.globallinkserver.GlobalLinkServer")
}

indra {
github("GeyserMC", "GlobalLinkServer") {
ci(true)
Expand All @@ -38,27 +27,39 @@ indra {
mitLicense()

javaVersions {
target(17)
target(21)
}

spotless {
java {
palantirJavaFormat()
// Broken until paperweight updates to a newer version of spotless (6.23.3+)
// palantirJavaFormat()
formatAnnotations()
}
ratchetFrom("origin/master")
}
}

repositories {
mavenLocal()

maven("https://repo.opencollab.dev/main")
maven("https://repo.papermc.io/repository/maven-public/")

mavenCentral()

maven("https://jitpack.io") {
content { includeGroupByRegex("com\\.github\\..*") }
}
}

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION

tasks.jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })

archiveBaseName = "GlobalLinkServer"
archiveBaseName = "GlobalLinkPlugin"
archiveVersion = ""
archiveClassifier = ""

manifest {
attributes["Main-Class"] = application.mainClass
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.0-SNAPSHOT
version=2.0-SNAPSHOT
31 changes: 14 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
[versions]
gson = "2.10.1"
protocol = "3.0.0.Beta5-20241022.154658-14"
netty = "4.1.110.Final"
fastutil = "8.5.2"
mcprotocollib = "86903ec" # Revert from jitpack after release
adventure-text = "4.15.0-20231207.074016-23" # Match version to MCPL
floodgate = "2.2.3-SNAPSHOT"
mariadb-client = "2.7.3"
fastutil = "8.5.2"
checker-qual = "3.21.1"

indra = "3.1.2"
paperweight = "2.0.0-beta.12"
runpaper = "2.3.1"

[libraries]
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
protocol-codec = { module = "org.cloudburstmc.protocol:bedrock-codec", version.ref = "protocol" }
protocol-connection = { module = "org.cloudburstmc.protocol:bedrock-connection", version.ref = "protocol" }
protocol-common = { module = "org.cloudburstmc.protocol:common", version.ref = "protocol" }

netty-handler = { group = "io.netty", name = "netty-handler", version.ref = "netty" }

fastutil-common = { module = "com.nukkitx.fastutil:fastutil-common", version.ref = "fastutil" }
mcprotocollib = { module = "com.github.GeyserMC:mcprotocollib", version.ref = "mcprotocollib" }
adventure-text-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "adventure-text" }
floodgate-api = { group = "org.geysermc.floodgate", name = "api", version.ref = "floodgate" }
mariadb-client = { module = "org.mariadb.jdbc:mariadb-java-client", version.ref = "mariadb-client" }

fastutil-int-int-maps = { group = "com.nukkitx.fastutil", name = "fastutil-int-int-maps", version.ref = "fastutil" }
fastutil-int-object-maps = { group = "com.nukkitx.fastutil", name = "fastutil-int-object-maps", version.ref = "fastutil" }
fastutil-object-int-maps = { group = "com.nukkitx.fastutil", name = "fastutil-object-int-maps", version.ref = "fastutil" }
fastutil-object-object-maps = { group = "com.nukkitx.fastutil", name = "fastutil-object-object-maps", version.ref = "fastutil" }

checker-qual = { module = "org.checkerframework:checker-qual", version.ref = "checker-qual" }

[plugins]
indra = { id = "net.kyori.indra", version.ref = "indra" }
indra-publishing = { id = "net.kyori.indra.publishing", version.ref = "indra" }
indra-licenser-spotless = { id = "net.kyori.indra.licenser.spotless", version.ref = "indra" }
paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
runpaper = { id = "xyz.jpenilla.run-paper", version.ref = "runpaper" }

[bundles]
protocol = ["protocol-codec", "protocol-connection", "protocol-common"]
fastutil = [ "fastutil-int-int-maps", "fastutil-int-object-maps", "fastutil-object-int-maps", "fastutil-object-object-maps" ]
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
22 changes: 13 additions & 9 deletions gradlew

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

22 changes: 12 additions & 10 deletions gradlew.bat

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

14 changes: 3 additions & 11 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
@file:Suppress("UnstableApiUsage")

dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
pluginManagement {
repositories {
mavenLocal()

maven("https://repo.opencollab.dev/main")

mavenCentral()

maven("https://jitpack.io") {
content { includeGroupByRegex("com\\.github\\..*") }
}
gradlePluginPortal()
maven("https://repo.papermc.io/repository/maven-public/")
}
}

Expand Down
Loading
Loading