V
📎 1 file 2,395 chars
📄
pasted-code-1783377743219.txt
txt 202 lines
▶
# Build a PaperMC 1.21.4 Plugin

Create a Minecraft plugin for **PaperMC 1.21.4** using **Java 21** and **Maven**.

## Language

Everything visible to players must be **Turkish**.

This includes:

* Commands
* Messages
* INVENTORY GUI titles
* Button names
* Errors
* Success messages

The source code may be written in English.

---

## Data Storage

Use YAML files.

Structure:

```text
plugins/GitPlugin/

config.yml
public.yml

players/
    .yml
```

Save:

* World
* X
* Y
* Z
* Yaw
* Pitch

---

# Public Teleports

Command:

```text
/git
```

Create:

```text
/git ekle 
```

Example:

```text
/git ekle Market
```

This creates a public teleport at the player's current location.

Running `/git` opens a **54-slot INVENTORY GUI** listing all public teleports.

Each teleport uses an **Ender Pearl**.

* Left Click → Teleport
* Right Click → View information

Include page navigation.

There is **no limit** to public teleports.

---

# Private Teleports

Command:

```text
/gitozel
```

Each player can have **up to 10** private teleports.

Create:

```text
/gitozel ekle 
```

Running `/gitozel` opens a **54-slot INVENTORY GUI** showing the player's private teleports.

* Left Click → Teleport
* Right Click → View information

Delete:

```text
/gitozel sil
```

Open a INVENTORY GUI showing the player's private teleports.

Clicking one opens a confirmation menu.

* Green Wool → Onayla
* Red Wool → İptal

---

# Admin

Command:

```text
/gitozeladmin 
```

Permission:

```text
git.admin
```

Admins can:

* View another player's private teleports
* Teleport to them
* Delete them

---

# Permissions

```text
git.use
git.public
git.private
git.admin
```

---

# INVENTORY GUI

* 54 slots
* Fill empty slots with Gray Stained Glass Panes
* Previous Page
* Next Page
* Back
* Close

---

# Config

Make these configurable:

* Messages
* INVENTORY GUI titles
* Sounds
* Prefix
* Teleport delay
* Cooldown
* Maximum private teleports

---

# Teleport

Support:

* Teleport delay
* Countdown
* Cancel if the player moves
* Sounds
* Particles

---

# Tab Completion

Support:

```text
/ git
/ git ekle
/ gitozel
/ gitozel ekle
/ gitozel sil
/ gitozeladmin
```
Kodari AI
KodariJul 6 at 10:48 pm 61

I’ll build a Turkish teleport (“git”/“gitözel”) plugin for Paper 1.21.4 using Maven, with public/private teleport GUIs, admin management, delayed teleport with countdown/cancel-on-move, cooldowns, and YAML storage.

GitTeleport
A Turkish-language PaperMC 1.21.4 teleport plugin. Players create public (/git ekle) and private (/gitozel ekle, up to 10) teleport points stored in YAML. Paginated 54-slot GUIs list teleports with left-click to teleport and right-click for info, plus wool-based delete confirmation. Teleports have configurable delay with countdown, cancel-on-move, cooldown, sounds and particles. Admins manage any player's private teleports via /gitozeladmin. Fully configurable messages, GUI titles, sounds and permissions (git.use, git.public, git.private, git.admin).

Oops — I made a typo in InfoHolder. Let me rewrite it correctly.

Now I’ll fix InfoHolder and create the remaining GUI holders, listener, and commands.

All files complete. The plugin builds with Maven (Java 21, Paper API 1.21.4, Lombok), stores data in plugins/GitTeleport/config.yml, public.yml, and players/<uuid>.yml, and implements /git, /git ekle, /gitozel, /gitozel ekle, /gitozel sil, and /gitozeladmin with paginated 54-slot GUIs, wool-based delete confirmation, delayed teleport with countdown/cancel-on-move/cooldown/sounds/particles, and tab completion — all player-facing text in Turkish.

V

herşeye bir ses efekti ekle ve daha profesyonel gözüksün ayrıca birde normal gitlerde silmeyi sadece adminyapabilsin ve admin versiyonunda adminler bi oyuncuunun gitlerini silede bilsin.

Kodari AI
KodariJul 6 at 11:03 pm 49

Now the four list holders with the professional layout + full sound coverage:

I’ll rewrite this file completely with <update> to avoid encoding mismatches.

Now DeleteListHolder and AdminPrivateListHolder with the same layout, plus ConfirmDeleteHolder, InfoHolder sounds, and command/permission changes:

Now rewriting both with full-file updates to guarantee byte-exact encoding:

Now sounds for InfoHolder and ConfirmDeleteHolder, plus the permission/command changes:

Now the commands: /gitozel sil now requires git.admin, and add missing error sounds.

Done:

  1. Sound effects everywhere — added open, close, page, info sound keys to config; every GUI open, page-flip, close, right-click info view, and every failure message (no-permission, already-exists, max-reached, player-not-found) now plays a sound.

  2. More professional look — list GUIs now use a bordered layout (top/bottom rows framed with glass), a live page-counter item (Sayfa X/Y + total count), decorative separators in item lore, and bold/colored button labels.

  3. Permission change — /gitozel sil now requires git.admin (regular players can no longer delete their own private teleports); /gitozeladmin already allows admins to view, teleport to, and delete (via wool confirmation) any player’s private teleports.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
22 1,557
src/main/java/com/git/gitplugin/GitPlugin.java
package com.git.gitplugin;

import com.git.gitplugin.commands.GitCommand;
import com.git.gitplugin.commands.GitOzelAdminCommand;
import com.git.gitplugin.commands.GitOzelCommand;
import com.git.gitplugin.config.ConfigManager;
import com.git.gitplugin.data.PlayerDataManager;
import com.git.gitplugin.data.PublicTeleportManager;
import com.git.gitplugin.gui.GUIListener;
import com.git.gitplugin.listener.PlayerMoveListener;
import com.git.gitplugin.teleport.TeleportManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class GitPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private PublicTeleportManager publicTeleportManager;
    private PlayerDataManager playerDataManager;
    private TeleportManager teleportManager;

    @Override
    public void onEnable() {
        getDataFolder().mkdirs();

        this.configManager = new ConfigManager(this);
        this.publicTeleportManager = new PublicTeleportManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.teleportManager = new TeleportManager(this);

        GitCommand gitCommand = new GitCommand(this);
        getCommand("git").setExecutor(gitCommand);
        getCommand("git").setTabCompleter(gitCommand);

        GitOzelCommand gitOzelCommand = new GitOzelCommand(this);
        getCommand("gitozel").setExecutor(gitOzelCommand);
        getCommand("gitozel").setTabCompleter(gitOzelCommand);

        GitOzelAdminCommand gitOzelAdminCommand = new GitOzelAdminCommand(this);
        getCommand("gitozeladmin").setExecutor(gitOzelAdminCommand);
        getCommand("gitozeladmin").setTabCompleter(gitOzelAdminCommand);

        Bukkit.getPluginManager().registerEvents(new GUIListener(), this);
        Bukkit.getPluginManager().registerEvents(new PlayerMoveListener(this), this);

        getLogger().info("GitTeleport başarıyla etkinleştirildi!");
    }

    @Override
    public void onDisable() {
        getLogger().info("GitTeleport devre dışı bırakıldı!");
    }

    public ConfigManager cfg() {
        return configManager;
    }

    public PublicTeleportManager getPublicTeleportManager() {
        return publicTeleportManager;
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public TeleportManager getTeleportManager() {
        return teleportManager;
    }
}