SayanVanish
SayanVanish copied to clipboard
A modular vanish system for Minecraft servers
Download Plugin | Link |
---|---|
Hangar (Recommended) | hangar.papermc.io/syrent/sayanvanish |
Modrinth | modrinth.com/plugin/sayanvanish |
Spigot | spigotmc.org/resources/sayanvanish-1-8-1-20-6.105992/ |
Introduction
Welcome to the introduction for SayanVanish, a versatile vanish system that allows you to disappear and reappear on your server network at will, along with many other features.
Supported Platforms
SayanVanish is compatible with the following platforms:
-
Minecraft
-
Bukkit
- Spigot
- Paper
- Folia
-
Proxy
- Velocity
- Bungeecord
-
Bukkit
Key Features
Modularity
SayanVanish is designed as a modular system. Each module serves a specific purpose, which simplifies the maintenance and extension of the plugin.
Extensive API
SayanVanish includes a comprehensive API, allowing other plugins to interact with it and utilize its features.
Integration with Other Plugins
The API provided by SayanVanish enables deep integration with other plugins, facilitating the development of additional server management tools.
How It Works?
SayanVanish uses a modular system to operate independently of specific platforms.
API Module
The api
module is designed for universal use across all platforms, providing access to necessary data.
User Interface
The User
interface contains all the basic data you might need. It is structured as follows:
Database
The main Database
interface includes all common database functions, which are implemented in various database classes such as SQL or Redis. This database is crucial for syncing data between multiple servers and SayanVanish instances across different networks.
Database Structure
The database structure is depicted below:
Features
Features in SayanVanish can be used to implement complex logic with certain constraints:
- All parameters within a feature must have default values.
- All parameters should be basic objects like
String
,Integer
,Boolean
, etc.
Rules for Features
Additionally, adhere to the following rules:
- Variables that should not be serialized must be annotated with
transient
.
The feature structure is illustrated as follows:
How to Use the API
SayanVanish contains an extensive API to perform all necessary actions. To start, add the SayanVanish dependency to your build tool of choice, such as Maven or Gradle.
Adding the Repository
In Maven
<repository>
<id>repo-sayandevelopment</id>
<name>SayanDevelopment Repository</name>
<url>https://repo.sayandev.org/snapshots</url>
</repository>
In Gradle
- Groovy
maven {
url "https://repo.sayandev.org/snapshots"
}
- Kotlin
maven {
url = uri("https://repo.sayandev.org/snapshots")
}
Adding the Dependency
You can use different platform-specific dependencies or the main platform-independent API.
Main API Dependency
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
.
In Maven
<dependency>
<groupId>org.sayandev</groupId>
<artifactId>sayanvanish-bukkit</artifactId>
<version>[get version from github]</version>
</dependency>
In Gradle
- Groovy
compileOnly "org.sayandev:sayanvanish-bukkit:[get version from github]"
- Kotlin
compileOnly("org.sayandev:sayanvanish-bukkit:[get version from github]")
Accessing the API
You can access the SayanVanish API like this:
SayanVanishAPI.getInstance();
Or you can use a platform-specific user type like this:
SayanVanishAPI<BukkitUser>.getInstance();
Or like this:
SayanVanishBukkitAPI.getInstance();
From this class, you can access and modify everything. For example, to add a new user:
SayanVanishAPI.getInstance().getDatabase().getUser(User);
Events
There are two Bukkit-specific events you can use: BukkitUserVanishEvent
and BukkitUserUnVanishEvent
. Both events contain the user and vanish options.