wraithsmp
📎 1 file 2,021 chars
📄
pasted-code-1784044842015.txt
txt 35 lines
▶
Make a minecraft lightweight plugin named ᴡʀᴀɪᴛʜ ᴄᴏʀᴇ
Commands : /menugui
/recipes
/recipe create 
/recipe delete 
/tpa
/tpaccept
/tpacancel
/tpahere
/setspawn 
/spawn
/wraithcore reload - reloads the config and other files
Description: 
/menugui - opens a 3x9 INVENTORY GUI where /recipes is connected to a white enchanted dye in slot no.11 and /guide with a renamed quil and book &6&lGuide book - Click me
Upon clicking the guide book it gives the quil and book with the contents written in guide.yml the guide will be in slot no 16 same with /guide when doing it, it gives the book.
/recipes opens a INVENTORY GUI for the recipes thats created like in a crafting table where we put a craft in 3x3 INVENTORY GUI and int he right side it shows the item in the recipes INVENTORY GUI it should show the item
In the recipe the title should be ꜱᴇʀᴠᴇʀ ʀᴇᴄɪᴘᴇꜱ

/recipes create  - opens a crafting table INVENTORY GUI where we can make custom crafting and upon leaving the INVENTORY GUI it saves the craft and shows it in the /recipes INVENTORY GUI and can be used 
/recipes delete  deletes the recipes

/tpa  - sends a tpa request to the player 
&7%ᴘʟᴀʏᴇʀ% &e has sent you a teleport request/tpaccept to accept the request, /tpacancel to cancel or deng the request  when the tpa is accepted it shows in their chat your tpa request has been accepted
Do not move for %time-edited-in-config%
%time%
%time%
(CONTINUES if there is more time left)
Then after the time is ended it tp's the player to the player 
Same with /tpahere

/setspawn sets a spawn point for /spawnz
When players use /spawn they get tp'ed to the /setspawn player should move for 7 seconds and the player should be informed. (Make it lightweight so the server doesnt lag when many of the players do the command at the same time) time and messages and other things can be edited in config

Make luckperms permission for - /setspawn, /recipe create, /recipe delete, /tpa, /tpaccept, /tpacancel , /tpahere
 Add mini message support
Kodari AI
KodariJul 14 at 4:02 pm 12
WraithCore
Wraith Core is a lightweight Minecraft utility plugin that provides a MiniMessage-enabled menu system, configurable server recipes, written guide books, teleport requests, delayed spawn teleportation, and persistent spawn management. It includes /menugui, /guide, /recipes, /recipe, /tpa, /tpaccept, /tpacancel, /tpahere, /setspawn, /spawn, and /wraithcore reload commands, with LuckPerms-compatible permission nodes and editable messages, timings, guides, and recipe storage.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
26 1,604
src/main/java/com/kodari/wraithcore/WraithCorePlugin.java
package com.kodari.wraithcore;

import com.kodari.wraithcore.command.CoreCommand;
import com.kodari.wraithcore.gui.GuiManager;
import com.kodari.wraithcore.listener.CoreListener;
import com.kodari.wraithcore.recipe.RecipeManager;
import com.kodari.wraithcore.service.ConfigManager;
import com.kodari.wraithcore.service.GuideService;
import com.kodari.wraithcore.service.MessageService;
import com.kodari.wraithcore.service.SpawnManager;
import com.kodari.wraithcore.service.TeleportManager;
import com.kodari.wraithcore.service.TeleportRequestManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class WraithCorePlugin extends JavaPlugin {
    private ConfigManager configManager;
    private MessageService messageService;
    private RecipeManager recipeManager;
    private GuideService guideService;
    private TeleportManager teleportManager;
    private TeleportRequestManager teleportRequestManager;
    private SpawnManager spawnManager;
    private GuiManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("guide.yml", false);
        saveResource("recipes.yml", false);

        configManager = new ConfigManager(this);
        messageService = new MessageService(this);
        recipeManager = new RecipeManager(this);
        guideService = new GuideService(this);
        teleportManager = new TeleportManager(this);
        teleportRequestManager = new TeleportRequestManager(this);
        spawnManager = new SpawnManager(this);
        guiManager = new GuiManager(this);

        recipeManager.load();
        guideService.reload();

        CoreCommand command = new CoreCommand(this);
        Bukkit.getPluginManager().registerEvents(new CoreListener(this), this);

        getCommand("menugui").setExecutor(command);
        getCommand("guide").setExecutor(command);
        getCommand("recipes").setExecutor(command);
        getCommand("tpa").setExecutor(command);
        getCommand("tpaccept").setExecutor(command);
        getCommand("tpacancel").setExecutor(command);
        getCommand("tpahere").setExecutor(command);
        getCommand("setspawn").setExecutor(command);
        getCommand("spawn").setExecutor(command);
        getCommand("wraithcore").setExecutor(command);
    }

    @Override
    public void onDisable() {
        if (teleportRequestManager != null) {
            teleportRequestManager.shutdown();
        }
        if (teleportManager != null) {
            teleportManager.shutdown();
        }
    }

    public void reloadAll() {
        reloadConfig();
        configManager.reload();
        recipeManager.load();
        guideService.reload();
    }

    public ConfigManager config() {
        return configManager;
    }

    public MessageService messages() {
        return messageService;
    }

    public RecipeManager recipes() {
        return recipeManager;
    }

    public GuideService guide() {
        return guideService;
    }

    public TeleportManager teleports() {
        return teleportManager;
    }

    public TeleportRequestManager requests() {
        return teleportRequestManager;
    }

    public SpawnManager spawn() {
        return spawnManager;
    }

    public GuiManager gui() {
        return guiManager;
    }
}