_ekkman_

Make a plugin that command (only for op) is /tutorialvillager and make it so it spawns a villager (unmovable and unhittable) just to click it with your left click like you hit it. make it so it opens a text, here it is: Welcome to ApexSMP! Type /spawn to get to the spawn. (another point) Type /sethome to save your location. (another point) Type /home to get back to the location. (another point) Type /rtp to teleport to random location. make 2 enters. If you need any help, just contact me on discord! (another point) To get the link to the discord, just type /discord. We hope you enjoy our server and have a great journey! (another point) -ApexSMP Team. make the text good, maybe change it and that (another point) i mean like you hit enter on your keyboard whn youre typing. make a button on the bootom that says Close. make it nice and clean.

Kodari AI
KodariJul 1 at 7:00 pm 1

I’ll create a tutorial villager plugin for ApexSMP.

TutorialVillager
Spawns an interactive tutorial villager that guides new players with server information. Features include a clickable villager that opens a custom GUI with command references, server info, and Discord details. Includes a clean inventory GUI with decorative border, command shortcuts, and a Close button. OP-only command to spawn the villager at your location.

I’ll create a tutorial villager plugin for ApexSMP. The villager is spawned with /tutorialvillager (OP only), is immobile and invulnerable, and left-clicking it opens a clean 5-row GUI with server information and a Close button.

TutorialVillager
Spawns an interactive tutorial villager that guides new players with server information. Features include a clickable villager that opens a clean GUI with command references, Discord info, and team signature. Uses a custom inventory GUI framework with bordered layout and a Close button. OP-only spawn command, villager is immobile and invulnerable.

All 11 files created. Here’s a summary of what was built:

Plugin structure:

  • TutorialVillagerPlugin — main class, registers listeners + command

  • TutorialVillagerCommand — /tutorialvillager (OP only) spawns an immobile, invulnerable, gravity-less villager named “§6§lTutorial Guide”

  • VillagerClickListener — intercepts left-clicks on the named villager, cancels damage, opens the GUI

GUI framework (reusable):

  • InventoryHandler — interface for click/open/close events

  • InventoryButton — builder with icon creator + click consumer

  • InventoryGUI — abstract base with lazy inventory init, button map, auto-decorate

  • GUIManager — tracks active inventories, routes events, auto-unregisters on close

  • GUIListener — Bukkit event listener that delegates to the manager

Tutorial GUI (5-row, 45 slots):

  • Black stained glass border on all edges

  • Row 1: Book (welcome + 4 command references) + Name Tag (team sig)

  • Row 2: Compass (/spawn), Red Bed (/sethome), Ender Pearl (/home), Ender Pearl (/rtp)

  • Row 3: Paper (Discord/help info)

  • Row 5: Barrier (Close button) — clicking it closes the inventory

_ekkman_

make it so when i type that command it will spawn villager npc that is unhittable and unmovable and make it so hes name is Tutorial

Kodari AI
KodariJul 1 at 7:03 pm 1

Done. The villager now spawns with name Tutorial (no formatting), stays immobile (AI: false, gravity: false), can’t be hit (damage cancelled and it’s invulnerable), and left-clicking opens the GUI.

_ekkman_

make it so he is visible at location where i do it. now it oes not show him. FIX IT

Kodari AI
KodariJul 1 at 7:06 pm 1

The villager was spawning at your feet (inside the ground/suffocating) and also despawning when you moved away. Fixed both issues — it now spawns 1 block above your location (eye level) and is set to never despawn.

_ekkman_

it still does not show him. MAKE THERE VISIBLE VILLAGER CALLET Tutorial AND MAKE HIM WORK

Kodari AI
KodariJul 1 at 7:10 pm 3

The villager is likely spawning on top of you (inside your hitbox). Let me fix it to spawn 3 blocks in front of where you’re looking, and make it fully robust.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 484
src/main/java/com/apexsmp/tutorialvillager/TutorialVillagerPlugin.java
package com.apexsmp.tutorialvillager;

import com.apexsmp.tutorialvillager.commands.TutorialVillagerCommand;
import com.apexsmp.tutorialvillager.inventory.gui.GUIListener;
import com.apexsmp.tutorialvillager.inventory.gui.GUIManager;
import com.apexsmp.tutorialvillager.listeners.VillagerClickListener;
import org.bukkit.plugin.java.JavaPlugin;

public class TutorialVillagerPlugin extends JavaPlugin {

    private GUIManager guiManager;

    @Override
    public void onEnable() {
        guiManager = new GUIManager();

        getCommand("tutorialvillager").setExecutor(new TutorialVillagerCommand(this));
        getServer().getPluginManager().registerEvents(new VillagerClickListener(this, guiManager), this);
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }
}