package io.musician101.musicianlibrary.java.minecraft.sponge.gui.anvil;

import io.musician101.musicianlibrary.java.minecraft.config.AbstractConfig;
import io.musician101.musicianlibrary.java.minecraft.sponge.plugin.AbstractSpongePlugin;
import java.util.function.BiConsumer;
import javax.annotation.Nonnull;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.scheduler.Task;

public class SpongeJumpToPage<C extends AbstractConfig, P extends AbstractSpongePlugin<C>> extends SpongeAnvilGUI {

    public SpongeJumpToPage(@Nonnull P plugin, @Nonnull Player player, int maxPage, @Nonnull BiConsumer<Player, Integer> biConsumer) {
        super(player, (p, name) -> {
            int page;
            try {
                page = Integer.parseInt(name);
            }
            catch (NumberFormatException e) {
                return "That is not a number!";
            }

            if (page > maxPage) {
                return "Page cannot exceed " + maxPage;
            }

            Task.builder().delayTicks(1L).execute(() -> biConsumer.accept(player, page)).submit(plugin.getInstance().get());
            return null;
        });
    }
}

@@ -70,173 +70,8 @@
 l;%0A%0A
-import io.musician101.musicianlibrary.java.minecraft.config.AbstractConfig;%0Aimport io.musician101.musicianlibrary.java.minecraft.sponge.plugin.AbstractSpongePlugin;%0A
 impo
@@ -228,114 +228,133 @@
 api.
-scheduler.Task;%0A%0Apublic class SpongeJumpToPage%3CC extends AbstractConfig, P extends AbstractSpongePlugin%3CC%3E
+plugin.PluginContainer;%0Aimport org.spongepowered.api.scheduler.Task;%0A%0Apublic class SpongeJumpToPage%3CP extends PluginContainer
 %3E ex

Fix SpongeAnvilGUI so that it actually extends a calss that exists.