Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
0e2f048
wip
Syrent May 4, 2025
b887bb3
wip
Syrent May 5, 2025
4d582ff
wip
Syrent May 7, 2025
20b6da2
Merge branch 'db-rewrite' into master
Syrent May 8, 2025
e6962b5
Merge pull request #379 from Syrent/master
Syrent May 8, 2025
2cf925e
wip
Syrent Jun 12, 2025
425eafd
feat: start working on messaging service
Syrent Jul 9, 2025
b84fede
api: new methods for User interface
Syrent Jul 9, 2025
200585b
chore: rename `Sync` to `Blocking` in runBlocking version of suspendi…
Syrent Jul 9, 2025
351a2e4
refactor: use new PlatformTable instead of native Table class in exposed
Syrent Jul 9, 2025
a4e15f9
doc: add documentation for User interface
Syrent Jul 9, 2025
b936938
feat: add cache service
Syrent Jul 16, 2025
a524d0b
chore: remove TODO.md
Syrent Jul 16, 2025
454c9be
chore: remove healthcheck feature for now to implement a new one later
Syrent Jul 16, 2025
fd91d54
chore: change default messaging type to websocket
Syrent Jul 16, 2025
492631f
chore: remove HealthCheckData.kt
Syrent Jul 16, 2025
165d350
chore: remove queue implementation as it's not a good way of handling it
Syrent Jul 16, 2025
cad2a39
chore: remove `Any.jsonObject()` and `JsonObject.fromJson()`
Syrent Jul 16, 2025
3c4b32c
chore: change SayanVanishAPI usage to VanishAPI.get()
Syrent Jul 16, 2025
96cfb6a
chore: add sendMessage capability to User
Syrent Jul 16, 2025
40b5c25
chore: add new todo
Syrent Jul 16, 2025
abbc55d
chore: update cache implementation
Syrent Jul 16, 2025
86a337f
feat: add more api methods for VanishUser interface
Syrent Jul 17, 2025
fc6d729
feat: add APIPlatformAdapter.kt
Syrent Jul 17, 2025
78dd0e2
chore: resolve all compile errors in bukkit module except features
Syrent Jul 17, 2025
df95a2e
chore: update some todos
Syrent Jul 17, 2025
9436fa4
chore: make suspending register/unregister methods inside Platform Jv…
Syrent Jul 17, 2025
e78c040
chore: the project compiles for bukkit module
Syrent Jul 18, 2025
31604cf
chore: it somewhat working now
Syrent Jul 18, 2025
146ebbb
chore: everything seems to work just fine on bukkit now
Syrent Jul 18, 2025
232f7bd
feat: update configuration system
Syrent Jul 19, 2025
604d42e
chore: 1.21.7 support
Syrent Jul 19, 2025
5366000
chore: tests work in progress
Syrent Jul 20, 2025
98ea4ae
chore: comment messaging unit tests for now
Syrent Aug 5, 2025
d45843b
chore: better configuration handling
Syrent Sep 26, 2025
2767b18
Merge branch 'master' into db-rewrite
Syrent Sep 29, 2025
d5b5c29
feat: velocity module compiles and runs
Syrent Oct 1, 2025
03841da
[ci skip] chore: trying to make shadowjar work again
Syrent Jan 7, 2026
4822b25
Merge branch 'refs/heads/master' into db-rewrite
Syrent Feb 22, 2026
d4526ba
chore: add stickynote submodule
Syrent Feb 22, 2026
0021f15
update stickynote module
Syrent Feb 22, 2026
50ebbf8
chore: update StickyNote submodule
Syrent Feb 22, 2026
1cdd78a
build: update stickynote to 2.0.0-alpha.36
Syrent Feb 22, 2026
b143ebc
chore: visibility update bugs
Syrent Feb 24, 2026
1aaa4ea
chore: use canSee as the source of truth for vanish conditions
Syrent Feb 24, 2026
3f948b3
chore: better permission handling; feat: reloadable messaging system
Syrent Feb 24, 2026
970b6bd
chore: better error handling for pastes; feat: add new User#sendMessa…
Syrent Feb 24, 2026
c8f48a8
chore: change noPermissionToKeepVanished message type to prefixed
Syrent Feb 24, 2026
6227a1b
chore: better update checker version handling
Syrent Feb 24, 2026
6f5c227
fix: parse placeholders for the correct user in `fake_message` feature
Syrent Feb 24, 2026
5250b51
chore: more powerful api
Syrent Feb 24, 2026
9877d27
chore: rename bukkit module to paper; chore: remove bungeecord module
Syrent Feb 24, 2026
5ae14d7
chore: restore velocity functionality
Syrent Feb 25, 2026
5bad7e4
chore: automatically add new options to configuration files
Syrent Feb 25, 2026
b5566dc
chore: do not make stickynote directory if the plugin is in fatjar mode
Syrent Feb 25, 2026
56b8c20
build: update stickynote
Syrent Feb 25, 2026
b54240f
fix: server id saving
Syrent Feb 25, 2026
32c3adc
build: update .gitignore
Syrent Feb 25, 2026
21367be
fix: keep vanish consistency on join and some other places
Syrent Feb 26, 2026
4a218bc
feat: add docs as submodule
Syrent Feb 26, 2026
a094add
chore: don't send vanish-notification-other to the user itself
Syrent Feb 26, 2026
c1f5fe5
fix(velocity): tab hook (requires deleting the previously generated `…
Syrent Feb 26, 2026
770d2d6
chore(paper): small optimization to TAB hook
Syrent Feb 26, 2026
37c6017
feat: add license header
Syrent Feb 26, 2026
affe799
chore: update supported versions
Syrent Feb 26, 2026
9c86228
build: alpha version 4
Syrent Feb 26, 2026
58049f8
chore: change command system to new api
Syrent Feb 26, 2026
1f34e34
chore: better commands
Syrent Feb 27, 2026
744b455
build: update stickynote
Syrent Feb 27, 2026
7768ba5
build: update stickynote
Syrent Feb 27, 2026
0229f6f
chore: update xseries
Syrent Feb 27, 2026
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ bin/

.idea
**/run
.kotlin
.kotlin
**/sayanvanish-test/**
.gradle-local
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "StickyNote"]
path = StickyNote
url = https://github.com/Sayan-Development/StickyNote.git
branch = pubsub-generic
[submodule "docs"]
path = docs
url = https://github.com/Syrent/sayanvanish-docs.git
branch = main
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ The dependency artifact for the main API is `sayanvanish-api`.

**Platform-Specific Dependencies**

For platform-specific dependencies, the artifact ID follows the format `sayanvanish-<platform>`. Examples include `sayanvanish-bukkit` and `sayanvanish-proxy-velocity`.
For platform-specific dependencies, the artifact ID follows the format `sayanvanish-<platform>`. Examples include `sayanvanish-paper` and `sayanvanish-proxy-velocity`.

**In Maven**

```xml
<dependency>
<groupId>org.sayandev</groupId>
<artifactId>sayanvanish-bukkit</artifactId>
<artifactId>sayanvanish-paper</artifactId>
<version>[get version from github]</version>
</dependency>
```
Expand All @@ -145,21 +145,21 @@ For platform-specific dependencies, the artifact ID follows the format `sayanvan
* **Groovy**

```groovy
compileOnly "org.sayandev:sayanvanish-bukkit:[get version from github]"
compileOnly "org.sayandev:sayanvanish-paper:[get version from github]"
```

* **Kotlin**

```kotlin
compileOnly("org.sayandev:sayanvanish-bukkit:[get version from github]")
compileOnly("org.sayandev:sayanvanish-paper:[get version from github]")
```

#### Accessing the API

You can access the SayanVanish API like this:

```java
SayanVanishAPI.getInstance();
SayanVanishAPI;
```

Or you can use a platform-specific user type like this:
Expand All @@ -177,7 +177,7 @@ SayanVanishBukkitAPI.getInstance();
From this class, you can access and modify everything. For example, to add a new user:

```java
SayanVanishAPI.getInstance().getDatabase().addUser(User);
SayanVanishAPI.getDatabase().addUser(User);
```

#### Events
Expand Down
1 change: 1 addition & 0 deletions StickyNote
Submodule StickyNote added at 90a155
100 changes: 71 additions & 29 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.google.gson.JsonParser
import com.diffplug.gradle.spotless.SpotlessExtension
import io.papermc.hangarpublishplugin.model.Platforms
import org.gradle.kotlin.dsl.exclude
import net.kyori.indra.licenser.spotless.IndraSpotlessLicenserExtension
import org.sayandev.plugin.StickyNotePackagingMode
import java.io.ByteArrayOutputStream
import java.net.HttpURLConnection
import java.net.URL
Expand All @@ -11,6 +12,7 @@ plugins {
`maven-publish`
id("io.papermc.hangar-publish-plugin") version "0.1.2"
id("com.modrinth.minotaur") version "2.8.10"
id("net.kyori.indra.licenser.spotless") version "4.0.0" apply false
id("org.sayandev.stickynote.project")
}

Expand All @@ -31,11 +33,26 @@ fun lastCommitMessages(): String {
val connection = url.openConnection() as HttpURLConnection
connection.requestMethod = "GET"
connection.setRequestProperty("Accept", "application/vnd.github.v3+json")
val response = connection.inputStream.bufferedReader().use { it.readText() }
val sha = JsonParser.parseString(response).asJsonObject.getAsJsonArray("workflow_runs").get(0).asJsonObject.get("head_sha").asString
// TODO: fix this
/*val response = runCatching { connection.inputStream.bufferedReader().use { it.readText() } }.getOrNull() ?: let {
println("Failed to fetch last commit messages from GitHub Actions API: ${connection.responseCode} ${connection.responseMessage}")
return "No recent commits found."
}

return executeGitCommand("log", "--pretty=format:%C(auto)%h %s %C(blue)<%an>", "$sha..HEAD")
// return "Dummy"
val sha = JsonParser.parseString(response).asJsonObject.getAsJsonArray("workflow_runs").let {
if (it.size() == 0) {
null
} else {
it.get(0).asJsonObject.get("head_sha").asString
}
}

return if (sha != null) {
executeGitCommand("log", "--pretty=format:%C(auto)%h %s %C(blue)<%an>", "$sha..HEAD")
} else {
"No changes"
}*/
return "Changelog unavailable due to API changes."
}

fun lastReleaseCommitMessages(): String {
Expand All @@ -44,11 +61,14 @@ fun lastReleaseCommitMessages(): String {
connection.requestMethod = "GET"
connection.setRequestProperty("Accept", "application/vnd.github.v3+json")
val response = connection.inputStream.bufferedReader().use { it.readText() }
val previousReleaseVersion = JsonParser.parseString(response).asJsonArray.get(1).asJsonObject.get("tag_name").asString
// TODO: fix this
/*val previousReleaseVersion = JsonParser.parseString(response).asJsonArray.get(1).asJsonObject.get("tag_name").asString

val currentProjectVersion = versionString

return executeGitCommand("log", "--pretty=format:%s%n", "$previousReleaseVersion..$currentProjectVersion")
return executeGitCommand("log", "--pretty=format:%s%n", "$previousReleaseVersion..$currentProjectVersion")*/

return "Changelog unavailable due to API changes."
}

val versionString: String = findProperty("version")!! as String
Expand All @@ -72,10 +92,49 @@ allprojects {
version = findProperty("version")!! as String

plugins.apply("java")
plugins.apply("org.jetbrains.kotlin.jvm")
plugins.apply("org.jetbrains.kotlin.plugin.serialization")
plugins.apply("maven-publish")
plugins.apply("kotlin")
plugins.apply("com.gradleup.shadow")
plugins.apply("java-library")
plugins.apply("org.sayandev.stickynote.project")
plugins.apply("com.modrinth.minotaur")
if (path.startsWith(":sayanvanish")) {
plugins.apply("net.kyori.indra.licenser.spotless")

extensions.configure<IndraSpotlessLicenserExtension>("indraSpotlessLicenser") {
licenseHeaderFile(rootProject.file("license_header.txt"))
property("name", rootProject.name)
property("url", "https://github.com/Syrent/SayanVanish")
}

extensions.configure<SpotlessExtension>("spotless") {
java {
target("src/**/*.java")
targetExclude("**/generated/**", "**/build/**", "**/docs/**", "**/StickyNote/**")
}
kotlin {
target("src/**/*.kt")
targetExclude("**/generated/**", "**/build/**", "**/docs/**", "**/StickyNote/**")
}
groovy {
target("src/**/*.groovy")
targetExclude("**/generated/**", "**/build/**", "**/docs/**", "**/StickyNote/**")
}
}

pluginManager.withPlugin("com.diffplug.spotless") {
tasks.named("build") {
dependsOn("spotlessApply")
}
}
}

stickynote {
packagingMode(StickyNotePackagingMode.FAT)
useSubmodule(true)
// relocate(!gradle.startParameter.taskNames.any { it.startsWith("runServer") || it.startsWith("runVelocity") })
}

repositories {
mavenLocal()
Expand Down Expand Up @@ -176,23 +235,12 @@ allprojects {
}

subprojects {
configurations.create("compileOnlyApiResolved").apply {
isCanBeResolved = true
extendsFrom(configurations.getByName("compileOnlyApi"))
}

java {
withSourcesJar()

disableAutoTargetJvm()
}

val publicationShadowJar by tasks.registering(ShadowJar::class) {
from(sourceSets.main.get().output)
configurations = listOf(*configurations.get().toTypedArray(), this@subprojects.configurations["compileOnlyApiResolved"])
archiveClassifier.set("")
}

tasks {
jar {
archiveClassifier.set("unshaded")
Expand All @@ -213,8 +261,7 @@ subprojects {
publishing {
publications {
create<MavenPublication>("maven") {
// from(components["shadow"])
artifact(publicationShadowJar.get())
from(components["shadow"])
artifact(tasks["sourcesJar"])
this.version = versionString

Expand Down Expand Up @@ -272,19 +319,14 @@ hangarPublish {

platforms {
register(Platforms.PAPER) {
jar.set(project(":sayanvanish-bukkit").tasks.shadowJar.flatMap { it.archiveFile })
jar.set(project(":sayanvanish-paper").tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set((property("paperVersion") as String).split(",").map { it.trim() })
}

register(Platforms.VELOCITY) {
jar.set(project(":sayanvanish-proxy:sayanvanish-proxy-velocity").tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set((property("velocityVersion") as String).split(",").map { it.trim() })
}

register(Platforms.WATERFALL) {
jar.set(project(":sayanvanish-proxy:sayanvanish-proxy-bungeecord").tasks.shadowJar.flatMap { it.archiveFile })
platformVersions.set((property("waterfallVersion") as String).split(",").map { it.trim() })
}
}
}
}
}
1 change: 1 addition & 0 deletions docs
Submodule docs added at 395178
28 changes: 9 additions & 19 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,14 @@ org.gradle.parallel=true
org.gradle.vfs.watch=true
systemProp.file.encoding=utf-8

paperVersion=1.8-1.21.11
foliaVersion=1.19.4-1.21.11
paperVersion=1.20.4-1.21.11
foliaVersion=1.20.4-1.21.11
velocityVersion=3.0-3.4
waterfallVersion=1.11-1.21

modrinthProjectID=hkzyeLcD
modrinthMinecraftVersions=1.8.9,\
1.9,1.9.1,1.9.2,1.9.3,1.9.4,\
1.10,1.10.1,1.10.2,\
1.11,1.11.1,1.11.2,\
1.12,1.12.1,1.12.2,\
1.13,1.13.1,1.13.2,\
1.14,1.14.1,1.14.2,1.14.3,1.14.4,\
1.15,1.15.1,1.15.2,\
1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,\
1.17,1.17.1,\
1.18,1.18.1,1.18.2,\
1.19,1.19.1,1.19.2,1.19.3,1.19.4,\
1.20,1.20.1,1.20.2,1.20.3,1.20.4,1.20.5,1.20.6,\
1.21,1.21.1,1.21.2,1.21.3,1.21.4,1.21.5,1.21.6,1.21.7,1.21.8,1.21.8,1.21.10,1.21.11
modrinthLoaders=paper,purpur,spigot,velocity,bungeecord,waterfall,folia
modrinthMinecraftVersions=1.20.4,1.20.5,1.20.6\
1.21,1.21.1,1.21.2,1.21.3,1.21.4,1.21.5,1.21.6,1.21.7,1.21.8,1.21.9,1.21.10,1.21.11
modrinthLoaders=paper,purpur,velocity,folia

group=org.sayandev
slug=sayanvanish
Expand All @@ -33,4 +20,7 @@ description=A modular vanish system for Minecraft servers
website=https://sayandev.org
author=Syrent

version=1.7.3
version=2.0.0-alpha.4

stickynote.useSubmodule=true
stickynote.submodulePath=StickyNote
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-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
16 changes: 16 additions & 0 deletions license_header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This file is part of $name, licensed under the GNU General Public License v3.0.

Copyright (c) $YEAR Sayan Development and contributors

$name is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

$name is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
13 changes: 13 additions & 0 deletions sayanvanish-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
stickynote {
registerModule(core {
database
configuration {
kotlinx
}
messaging {
redis
websocket
}
})
}

dependencies {
compileOnlyApi(libs.discordsrv)
compileOnlyApi(libs.luckperms.api)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This file is part of SayanVanish, licensed under the GNU General Public License v3.0.
*
* Copyright (c) 2026 Sayan Development and contributors
*
* SayanVanish is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SayanVanish is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.sayandev.sayanvanish.api

class APIPlatformAdapter : PlatformAdapter<User, VanishUser> {
override fun adapt(user: User): User {
return user
}

override fun adapt(vanishUser: VanishUser): VanishUser {
return vanishUser
}
}
Loading