13
0
geforkt von Mirrors/Paper

remove test plugin diff accidentally committed

Dieser Commit ist enthalten in:
Jake Potrebic 2024-12-22 11:44:49 -08:00
Ursprung 4c6ea8416b
Commit c31d95eccb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 27CC63F7CBC866C7
2 geänderte Dateien mit 0 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -1,9 +1,5 @@
package io.papermc.testplugin; package io.papermc.testplugin;
import io.papermc.paper.registry.RegistryAccess;
import io.papermc.paper.registry.RegistryKey;
import org.bukkit.Art;
import org.bukkit.Registry;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -14,10 +10,6 @@ public final class TestPlugin extends JavaPlugin implements Listener {
this.getServer().getPluginManager().registerEvents(this, this); this.getServer().getPluginManager().registerEvents(this, this);
// io.papermc.testplugin.brigtests.Registration.registerViaOnEnable(this); // io.papermc.testplugin.brigtests.Registration.registerViaOnEnable(this);
final Registry<Art> registry = RegistryAccess.registryAccess().getRegistry(RegistryKey.PAINTING_VARIANT);
final Art art = registry.get(TestPluginBootstrap.NEW);
System.out.println(art.getKey());
} }
} }

Datei anzeigen

@ -2,30 +2,13 @@ package io.papermc.testplugin;
import io.papermc.paper.plugin.bootstrap.BootstrapContext; import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.bootstrap.PluginBootstrap; import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
import io.papermc.paper.registry.TypedKey;
import io.papermc.paper.registry.event.RegistryEvents;
import io.papermc.paper.registry.keys.PaintingVariantKeys;
import net.kyori.adventure.key.Key;
import org.bukkit.Art;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import static net.kyori.adventure.text.Component.text;
public class TestPluginBootstrap implements PluginBootstrap { public class TestPluginBootstrap implements PluginBootstrap {
static final TypedKey<Art> NEW = PaintingVariantKeys.create(Key.key("test:test"));
@Override @Override
public void bootstrap(@NotNull BootstrapContext context) { public void bootstrap(@NotNull BootstrapContext context) {
// io.papermc.testplugin.brigtests.Registration.registerViaBootstrap(context); // io.papermc.testplugin.brigtests.Registration.registerViaBootstrap(context);
context.getLifecycleManager().registerEventHandler(RegistryEvents.PAINTING_VARIANT.freeze(), event -> {
event.registry().register(NEW, builder -> {
builder.assetId(Key.key("wind"))
.author(text("ME"))
.width(2)
.height(2);
});
});
} }
} }