actually register the interaction and test events

This commit is contained in:
2026-01-16 20:58:15 +01:00
parent 969a532787
commit 6665120e16
4 changed files with 71 additions and 12 deletions
@@ -1,19 +1,28 @@
package me.youhavetrouble.quickerstacker;
import com.hypixel.hytale.server.core.event.events.ecs.UseBlockEvent;
import com.hypixel.hytale.server.core.event.events.player.PlayerInteractEvent;
import com.hypixel.hytale.server.core.event.events.player.PlayerReadyEvent;
import com.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction;
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
import me.youhavetrouble.quickerstacker.interaction.ChestInteraction;
import me.youhavetrouble.quickerstacker.listener.ChestInteractListener;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
public class QuickerStacker extends JavaPlugin {
public QuickerStacker(@NonNullDecl JavaPluginInit init) {
super(init);
}
@Override
public void setup() {
this.getEventRegistry().registerGlobal(UseBlockEvent.class, ChestInteractListener::onChestInteract);
this.getEventRegistry().registerGlobal(PlayerReadyEvent.class, ChestInteractListener::playerJoin);
this.getCodecRegistry(Interaction.CODEC).register("YouHaveTrouble_QuickerStacker_QuickStackToChest", ChestInteraction.class, ChestInteraction.CODEC);
}
}