alyxz1234

can u make an ZeinBan i want to make it like this /offend (username) (duration) (reason) like that i sent u a photo

Kodari AI
KodariOct 20 at 4:11 pm 1
ZeinBan
ZeinBan is a moderation plugin that enables staff to issue temporary bans via a single command: /offend (username) (duration) (reason). It parses duration strings like 1d, 2h, 30m, stores punishments in persistent storage, and automatically kicks offending players upon execution. The plugin schedules unban tasks upon expiry, broadcasts staff actions, and provides an optional reason-enforcement rule to keep records comprehensive. Designed for lightweight server administration, ZeinBan integrates seamlessly with existing permissions and includes a cleanup mechanism for expired entries.
  1. Create the Paper plugin setup and register /offend.

  2. Add duration-based bans with persistent storage and an image-style disconnect message.

  3. Check bans on login and immediately kick online targets.

Created ZeinBan with /offend <username> <duration|perm> <reason>. Durations support values like 30m, 12h, 7d, and 1w2d; bans are saved across restarts, block players on login, and immediately kick online targets with a disconnect message styled after your screenshot.

alyxz1234

can u compile it and why did it error when i compile

Kodari AI
KodariOct 20 at 4:12 pm 1

On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project. Then click Compile in the window. If it fails, click Auto-fix in chat or Fix in the build window.

I can’t tell what caused the error without the build output. Paste the first error message here (or send a screenshot), and I’ll help fix it.

alyxz1234

it say

Compilation Error Missing required files

Kodari AI
KodariOct 20 at 4:17 pm 1

I’ll restore the missing Gradle build, Paper plugin descriptor, and ZeinBan source files so the project has the files required to compile.

The project was empty, so the compiler had no Gradle build file, plugin descriptor, or Java source files to compile. I’ve created those files and added the ZeinBan /offend implementation.

Try Compile again from the top bar. If it still fails, send me the new build error.

alyxz1234

bro add a space and add a config for like

"put ur discordlink here"

and make it like

"your are temporarily banned for (reason) " " and blah balh

Kodari AI
KodariOct 20 at 4:21 pm 1
  1. Add a config setting for the Discord link and editable ban-screen text.

  2. Keep blank lines between the reason, time, staff, and appeal details.

Added config.yml with a placeholder Discord link and editable ban-screen text. The message now has blank lines between the reason, time left, staff name, and appeal link.

Replace put ur discordlink here in the config with your Discord invite. The message supports %type%, %reason%, %time%, %staff%, and %discord%.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 378
src/main/java/com/zeinban/ZeinBan.java
package com.zeinban;

import com.zeinban.command.OffendCommand;
import com.zeinban.listener.BanListener;
import com.zeinban.manager.BanManager;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class ZeinBan extends JavaPlugin {
    private BanManager banManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.banManager = new BanManager(this);
        PluginCommand offendCommand = getCommand("offend");
        if (offendCommand == null) {
            getLogger().severe("The /offend command is missing from plugin.yml; disabling ZeinBan.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        OffendCommand executor = new OffendCommand(this, banManager);
        offendCommand.setExecutor(executor);
        offendCommand.setTabCompleter(executor);
        getServer().getPluginManager().registerEvents(new BanListener(this, banManager), this);
    }

    public BanManager getBanManager() {
        return banManager;
    }
}