Вопрос Почему не загружается плагин Paper?

Версия Minecraft
1.20.X

LimeMC

Пользователь
Сообщения
41
PlugManX пишет файл - невалидный плагин

plugin.yml
Java:
name: Plugin
version: '1.0.0'
main: me.name.Plugin.Plugin
api-version: '1.21'
prefix: Plugin
load: STARTUP
authors: [ name]
description: Plugin

главный файл
Java:
package me.name.Plugin;

import me.name.Plugin.listeners.chat.MainChatListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.logging.Logger;

public final class Plugin extends JavaPlugin {

    private static Plugin instance;
    private final Logger log = this.getLogger();

    @Override
    public void onEnable() {
        log.info("Plugin is enabled!");
        Bukkit.getPluginManager().registerEvents(new MainChatListener(), this);
    }

    @Override
    public void onDisable() {
        log.info("Plugin is disabled!");
    }
}

MainChatListener.java
Java:
package me.name.Plugin.listeners.chat;

import io.papermc.paper.event.player.AsyncChatEvent;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;

public class MainChatListener implements Listener {
    @EventHandler
    public void onChat(AsyncChatEvent event) {
        event.renderer((source, sourceDisplayName, message, viewer) ->
                Component.text()
                        .append(sourceDisplayName.color(TextColor.fromHexString("#31adc9")))
                        .append(Component.text(" > "))
                        .append(message)
                        .build());
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        event.joinMessage(Component.text()
                .append(Component.text("["))
                .append(Component.text("+", TextColor.fromHexString("#28ff03")))
                .append(Component.text("] "))
                .append(event.getPlayer().displayName())
                .build());
    }

    @EventHandler
    public void onQuit(PlayerQuitEvent event) {
        event.quitMessage(Component.text()
                .append(Component.text("["))
                .append(Component.text("-", TextColor.fromHexString("#ff162a")))
                .append(Component.text("] "))
                .append(event.getPlayer().displayName())
                .build());
    }
}

Извините за (наверное) тупой вопрос
 
Последнее редактирование:
[19:10:17 ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'NoVanila-1.0.0.jar' in folder 'plugins/.paper-remapped'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.21
at org.bukkit.craftbukkit.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:389) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:121) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:546) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:320) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1150) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Объединено

но ведь сервер на 1.21.1 , что не так? или я не понял?
 
Назад
Сверху Снизу