Altay
Plugins

plugin.yml reference

Every field the manifest accepts, and what the server does with it.

plugin.yml sits at the root of the plugin and tells the server what to load and when.

plugin.yml
name: Greeter
main: altay\greeter\Main
version: 1.0.0
api: [5.0.0]
author: you
description: Greets players when they join

Required fields

Prop

Type

Optional fields

Prop

Type

Commands

commands:
  greet:
    description: Greets someone
    usage: "/greet <player>"
    permission: greeter.command
    aliases: [hello]

Declaring a command here registers it. Handling it is onCommand() in your main class, or a separate CommandExecutor.

Permissions

permissions:
  greeter.command:
    description: Allows using /greet
    default: op
  greeter.admin:
    description: Administrative access
    default: false
    children:
      greeter.command: true

default is true, false, op or notop. children grants the listed nodes along with the parent. More in Permissions.

Dependencies, honestly

depend is a hard requirement. If the dependency is missing, your plugin does not load at all, and the server says so in the log. Use softdepend when you can work without the other plugin, and check for it at runtime:

$economy = $this->getServer()->getPluginManager()->getPlugin("SomeEconomy");

if($economy === null){
    $this->getLogger()->notice("No economy plugin found, payouts are disabled.");
}

Two plugins that depend on each other deadlock the loader and neither one starts.

On this page