Skip to content

Basic usage

itsTyrion edited this page Mar 1, 2024 · 1 revision

Bukkit/Spigot/Paper/Pufferfish/Purpur

(This example does not show all properties)

import org.bukkit.plugin.java.JavaPlugin;

import de.itsTyrion.pluginAnnotation.bukkit.BukkitPlugin;

@Plugin(
        name = "MyPlugin",
        description = "Awesome Bukkit plugin",
        authors = {"Your Name"},
        depend = {"AnotherPluginYouDependOn"}
)
public class MyPlugin extends JavaPlugin {
    // Your plugin code here
}

BungeeCord/Waterfall

import net.md_5.bungee.api.plugin.Plugin;

import de.itsTyrion.pluginAnnotation.bungee.BungeePlugin;

@Plugin(
        name = "MyPlugin",
        description = "Awesome Bungee/Waterfall plugin",
        author = "Your Name",
        depends = {"AnotherPluginYouDependOn"}
)
public class MyBungeePlugin extends Plugin {
    // Your plugin code here
}

Velocity

import net.md_5.bungee.api.plugin.Plugin;

import de.itsTyrion.pluginAnnotation.velocity.VelocityPlugin;
import de.itsTyrion.pluginAnnotation.velocity.Dependency;

@Plugin(
        name = "MyPlugin",
        description = "Awesome Bungee/Waterfall plugin",
        author = "Your Name",
        dependencies = {@Dependency(id = "a-plugin"), @Dependency(id = "an-optional-plugin", optional = true)}
)
public class MyVelocityPlugin {
    // Your plugin code here
}
Clone this wiki locally