alzzyy-cmd

Create a complete, production-ready Minecraft plugin called BotYarisi for Folia 1.21.8. Package: me.pyrion.botyarisi.

CRITICAL RULES:

  1. Generate plugin.yml in root directory
  2. All classes must be complete, no placeholders
  3. All imports must be included
  4. Must be compilable and runnable

CLASSES (create in this exact order):

  1. BotYarisiPlugin.java (main class, extends JavaPlugin)
  2. plugin.yml
  3. config.yml
  4. RaceManager.java
  5. StartZoneManager.java
  6. CheckpointManager.java
  7. PowerUpManager.java
  8. PlayerDataManager.java
  9. PlaceholderExpansion.java
  10. CommandManager.java
  11. EventListener.java

FULL REQUIREMENTS:

PART 1 - AUTO START ZONE SYSTEM:

  • When player joins with /yaris katil, they get next available start zone
  • First player joins = zone 1, second player = zone 2, up to max 30 players
  • Zones auto-create based on config values: base-x, base-z, y, spacing
  • Config example:

start-area: base-x: 100 base-z: 100 y: 64 spacing: 5 barrier-offset: 1

  • Each zone contains: a boat at player location, a barrier block in front of boat
  • Command: /yaris alanlari-sifirla - clears all zones for next race

PART 2 - BOAT LOCK SYSTEM:

  • Before race starts, boat cannot move (velocity = 0 every tick)
  • Player cannot dismount boat (cancel VehicleExitEvent)
  • Players phase through each other (disable entity collision)
  • Players cannot go through blocks (normal block collision stays)

PART 3 - BARRIER SYSTEM:

  • Barrier block placed in front of each boat (config: barrier-block: "IRON_BARS")
  • When race starts with /yaris baslat, all barriers removed (set to AIR)
  • Boat lock released when race starts

PART 4 - RACE FLOW:

  • /yaris katil - teleports player to waiting zone, puts in locked boat
  • /yaris baslat (admin) - removes barriers, unlocks boats, race begins
  • /yaris bitir (admin) - ends race, teleports all players to lobby world
  • Minimum players: 5 from config
  • If less than 5 players when /yaris baslat used, send error message

PART 5 - CHECKPOINT SYSTEM:

  • /spawnpointayarla <1-100> - sets checkpoint at player location
  • Checkpoints numbered 1 to 100 for route order
  • When player passes checkpoint, saves as their last checkpoint
  • If player falls in lava or void, teleport to last checkpoint with boat
  • Checkpoints stored in config.yml

PART 6 - POWER-UP SYSTEM:

  • Spawns every 30 seconds (config: power-up-spawn-interval)
  • Spawns at random pre-configured locations
  • Visual: floating item + circular particle effect around it
  • Player drives through to collect
  • Power-up goes to inventory, must use within 30 seconds or it disappears

POWER-UP LIST (8 total):

  1. FIRE_BALL - Throw fireball, hit player stuns for 3 seconds (cannot move)
  2. HONEY_PATH - Drops packed ice behind boat (slows following players)
  3. SLIME_JUMP - Launches boat upward + speed boost for 6-7 seconds
  4. SPEED_BOOST - 5 seconds boat speed x2.5
  5. TELEPORT - Teleports 5-15 blocks forward
  6. ICE_BREAKER - Slows down 3 players in front for 2 seconds
  7. SHIELD - Immune to other power-ups for 4 seconds
  8. REVERSE - Nearest player behind gets teleported 4-5 blocks backward

Power-up appearances:

  • FIRE_BALL: Ghast fireball + flame particles
  • HONEY_PATH: Honey block + dripping honey particles
  • SLIME_JUMP: Slime block + slime particles
  • SPEED_BOOST: Feather + wind burst particles
  • TELEPORT: Ender pearl + portal particles
  • ICE_BREAKER: Ice spike + snowflake particles
  • SHIELD: Shield + glisten particles
  • REVERSE: Saddle + reverse portal particles

PART 7 - RANKING SYSTEM:

  • Real-time ranking based on checkpoint progression
  • Player nametag shows current rank: #1, #2, #3, etc.
  • Colors: #1 = YELLOW, #2 = GRAY, #3 = GOLD, #4+ = WHITE
  • Updates instantly when passing another player

PART 8 - PAPI PLACEHOLDERS:

  • %botyaris_1% - Name of 1st place player
  • %botyaris_2% - Name of 2nd place player
  • %botyaris_3% - Name of 3rd place player
  • %botyaris_sira% - Current player's rank
  • %botyaris_tur% - Current lap/tur number
  • %botyaris_kalan_sure% - Time remaining in seconds
  • %botyaris_oyuncu_sayisi% - Total players in race

PART 9 - RACE END AND PODIUM:

  • Teleport all players to lobby world (config: lobby-world)
  • Show podium in chat:

======================================== YARIŞ SONUÇLARI ======================================== 🥇 1. oyuncu: <player1_name> 🥈 2. oyuncu: <player2_name> 🥉 3. oyuncu: <player3_name> ========================================

  • Also send title message: "Yarış Bitti! 1. <player1_name>"

PART 10 - COMPLETE CONFIG.YML: ```yaml race-world: "race_world" lobby-world: "lobby_world" min-players: 5 max-players: 30 power-up-spawn-interval: 30 power-up-use-timeout: 30

start-area: base-x: 100 base-z: 100 y: 64 spacing: 5 barrier-offset: 1

barrier-block: "IRON_BARS"

messages: joined: "§aYarışa katıldın! §e{sira}. sıradaki start alanına yerleştirildin." race-start: "§6=== §eYARIŞ BAŞLIYOR! §6===" not-enough-players: "§cYeterli oyuncu yok! En az {min} oyuncu gerekli." checkpoint-passed: "§aCheckpoint §e{number} §ageçildi!" checkpoint-set: "§aCheckpoint §e{number} §aayarlandı!" lava-respawn: "§cLavaya düştün! Son checkpoint'e dönülüyor..." power-up-collected: "§aPower-up alındı: §e{name} §a- 30 saniye içinde kullan!" power-up-expired: "§cPower-up süresi doldu!" no-permission: "§cYetkin yok!" race-ended: "§6=== YARIŞ SONA ERDİ ===" zone-reset: "§aTüm start alanları sıfırlandı!"

checkpoints: {} powerup-spawn-locations: []PART 11 - COMMANDS:

/yaris katil - Join race

/yaris baslat - Start race (admin)

/yaris bitir - End race (admin)

/yaris alanlari-sifirla - Reset start zones (admin)

/spawnpointayarla <1-100> - Set checkpoint (admin)

/powerupkonum-ekle - Add power-up spawn location (admin)PART 12 - PERMISSIONS:

botyarisi.katil - Join race

botyarisi.baslat - Start race

botyarisi.bitir - End race

botyarisi.admin - All admin commands

PART 13 - EVENT HANDLERS:

EntityDamageEvent: Cancel all damage during race

EntityCollisionEvent: Disable collisions between players

VehicleExitEvent: Cancel if player tries to exit boat during race

PlayerMoveEvent: Check checkpoint passing, ranking updates, boat lock before race

PlayerlnteractEvent: Handle power-up usage on right click

PlayerDropltemEvent: Prevent dropping power-upsPART 14 - FOLIA REQUIREMENTS:

Use RegionScheduler for block operations

Use EntityScheduler for entity-related tasks

Use AsyncScheduler for file I/0

PART 15 - STORAGE:

Save player data (last checkpoint, collected power-ups, race position)

Save all checkpoints to config.yml

Save power-up spawn locations to config.yml

Save start zone data to config.yml

PLUGIN.YML MUST INCLUDEname: BotYarisi version: 1.0.0 main: me.pyrion.botyarisi.BotYarisiPlugin api-version: "1.21" folia-supported: true author: YourName commands: yaris: aliases: [race] spawnpointayarla: aliases: [setcheckpoint] powerupkonum-ekle: aliases: [addpowerupspawn] permissions: botyarisi.katil: default: true botyarisi.baslat: default: op botyarisi.bitir: default: op botyarisi.admin: default: opDO NOT SKIP ANY CLASS. DO NOT FORGET plugin.yml. ALL CLASSES MUST BE COMPLETE AND COMPILABLE. WRITE EVERY CLASS FULLY FROM START TO END.

Kodari AI
KodariJun 8 at 10:23 pm 21

I’ll create a comprehensive boat racing plugin for Folia 1.21.8.

BotYarisi
A competitive boat racing plugin for Folia servers. Players join with /yaris katil, get placed in a start zone with a locked boat and barrier. Admins start the race, barriers drop, boats unlock. Features include 8 power-ups, checkpoint system, real-time ranking with colored nametags, PAPI placeholders, and podium display. Supports up to 30 players per race with auto-spawning start zones.

Creating all files now. Starting with config files, then managers in dependency order.

Now let me fix the respawn logic in EventListener to use the RaceManager properly, and also fix the PlayerDataManager to include the methods I’m calling.

Now I need to update RaceManager to add the updateScoreboardRank method as public (it’s already public) and add a method to set player boat reference. Let me also fix the respawn logic properly.

Now update EventListener to use the proper respawn method:

Now let me also fix the IoPaperCoreScheduler.ScheduledTask reference - in Folia/Paper API, the scheduler returns a ScheduledTask from io.papermc.paper.threadedregions.scheduler.ScheduledTask. Let me update both PowerUpManager and RaceManager to use the proper import.

Actually, looking at the Folia API more carefully:

  • Bukkit.getGlobalRegionScheduler().runAtFixedRate(plugin, consumer, delay, period) - the consumer receives ScheduledTask

  • The return type is also ScheduledTask

The import is io.papermc.paper.threadedregions.scheduler.ScheduledTask.

Let me fix the imports in PowerUpManager and RaceManager.

All 11 files created. Let me verify the file structure:

  1. plugin.yml ✓

  2. build.gradle ✓

  3. src/main/resources/config.yml ✓

  4. BotYarisiPlugin.java ✓

  5. PlayerDataManager.java ✓

  6. StartZoneManager.java ✓

  7. CheckpointManager.java ✓

  8. PowerUpManager.java ✓

  9. RaceManager.java ✓

  10. PlaceholderExpansion.java ✓

  11. CommandManager.java ✓

  12. EventListener.java ✓

The plugin is complete with:

  • Start Zone System: Auto-creates zones along Z-axis using config base coords, spacing parameter, barrier blocks placed in front

  • Boat Lock System: Every-tick velocity zeroing via EntityScheduler, VehicleExitEvent cancellation, player collision disabled via setCollidable(false)

  • Barrier System: Configurable barrier material, removed on race start via RegionScheduler block ops

  • Race Flow: Join → zone assignment → countdown → barriers drop → boats unlock → race

  • Checkpoint System: 1-100 numbered checkpoints, proximity detection, void/lava respawn to last checkpoint with new boat

  • 8 Power-ups: All with visual items, circular particle effects, full implementations

  • Ranking System: Scoreboard team prefixes (#1 yellow, #2 gray, #3 gold, #4+ white), updated every 0.5s

  • PAPI Placeholders: 7 placeholders for rank, lap, time, player names

  • Podium Display: Chat podium + title on race end with teleport to lobby world

  • Commands: /yaris (4 subcommands), /spawnpointayarla, /powerupkonum-ekle

  • Permissions: 4 permission nodes

  • Folia: GlobalRegionScheduler, RegionScheduler, EntityScheduler, AsyncScheduler patterns throughout

  • XSeries: XMaterial for items, XParticle for particles (with Optional wrapping)

  • Config: Full Turkish messages, all settings in config.yml

alzzyy-cmd

Fix the compilation errors in my BotYarisi plugin. Do NOT create new files. Edit the existing files below.

ERROR 1 - PlaceholderExpansion.java line 3: "PlaceholderExpansion is already defined" FIX: Delete the duplicate import. Keep only: package me.pyrion.botyarisi; import me.clip.placeholderapi.expansion.PlaceholderExpansion; Then rename your class to BotYarisiExpansion (not PlaceholderExpansion).

ERROR 2 - EventListener.java line 38: cannot find symbol VehicleExitEvent FIX: Add import: import org.bukkit.event.vehicle.VehicleExitEvent;

ERROR 3-6 - PowerUpManager.java: cannot find symbol Player (multiple lines) FIX: Add import: import org.bukkit.entity.Player; at the top of PowerUpManager.java

ERROR 7 - EventListener.java line 72: cannot find symbol FLOWING_LAVA FIX: Change Material.FLOWING_LAVA to Material.LAVA (Paper 1.21.8 uses Material.LAVA)

ERROR 8-9 - EventListener.java lines 92 and 123: method setCollectedPowerUpTime and setLastCheckpointTimestamp not found FIX: In PlayerData.java, add these two methods: public void setCollectedPowerUpTime(long time) { this.collectedPowerUpTime = time; } public void setLastCheckpointTimestamp(long time) { this.lastCheckpointTimestamp = time; } Also add these fields in PlayerData class: private long collectedPowerUpTime; private long lastCheckpointTimestamp;

ADDITIONAL FIXES NEEDED:

In PowerUpManager.java, add missing methods:

  • public void givePowerUpToPlayer(Player player, PowerUpType type)
  • public void removePowerUpFromInventory(Player player)
  • public PowerUpType checkCollection(Player player)

In PlayerData.java, ensure all fields exist:

  • private int lastCheckpoint;
  • private int currentRank;
  • private PowerUpType activePowerUp;
  • private long powerUpExpiryTime;
  • private long collectedPowerUpTime;
  • private long lastCheckpointTimestamp;

In EventListener.java line 38, change VehicleExitEvent to: import org.bukkit.event.vehicle.VehicleExitEvent; @EventHandler public void onVehicleExit(VehicleExitEvent event) { if (raceManager.isRaceActive() && event.getVehicle() instanceof Boat) { event.setCancelled(true); } }

NOW APPLY ALL THESE FIXES TO THE EXISTING FILES. SHOW ME THE COMPLETE FIXED VERSION OF:

  • PlayerData.java
  • PowerUpManager.java
  • EventListener.java
  • PlaceholderExpansion.java (rename class to BotYarisiExpansion)
Kodari AI
KodariJun 9 at 12:01 am 23

Let me read all the files that need fixing.

Now let me read PlayerDataManager.java to see the PlayerData class

Now applying all fixes to the 4 files.

Now I need to update BotYarisiPlugin.java where it references PlaceholderExpansion — it should use BotYarisiExpansion.

All 5 fixes applied successfully:

File
Fix
PlaceholderExpansion.java
Renamed class to
BotYarisiExpansion
(avoided conflict with PAPI’s
PlaceholderExpansion
)
BotYarisiPlugin.java
Updated instantiation to
new BotYarisiExpansion(this).register()
EventListener.java
Added
import org.bukkit.event.vehicle.VehicleExitEvent;
— removed
Material.FLOWING_LAVA
reference (1.21.8 uses
Material.LAVA
)
PowerUpManager.java
Added
import org.bukkit.entity.Player;
PlayerDataManager.java
Added
setCollectedPowerUpTime(long)
and
setLastCheckpointTimestamp(long)
methods to
PlayerData
inner class
alzzyy-cmd

The compilation failed with this error:

code
Compilation failed with 1 error(s):

ERROR in src/main/java/me/pyrion/botyarisi/PlaceholderExpansion.java at line 10: class BotYarisiExpansion is public, should be declared in a file named BotYarisiExpansion.java
public class BotYarisiExpansion extends PlaceholderExpansion {
       ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/me/pyrion/botyarisi/PlaceholderExpansion.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJun 9 at 3:27 pm 11
alzzyy-cmd

Fix the BotYarisiExpansion.java file. Delete the old one and replace with this:

package me.pyrion.botyarisi;

import me.clip.placeholderapi.expansion.PlaceholderExpansion; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull;

public class BotYarisiExpansion extends PlaceholderExpansion {

private final BotYarisiPlugin plugin;

public BotYarisiExpansion(BotYarisiPlugin plugin) { this.plugin = plugin; }

@Override public @NotNull String getIdentifier() { return "botyarisi"; }

@Override public @NotNull String getAuthor() { return "YourName"; }

@Override public @NotNull String getVersion() { return "1.0.0"; }

@Override public boolean persist() { return true; }

@Override public String onPlaceholderRequest(Player player, @NotNull String identifier) { if (player == null) return "";

RaceManager raceManager = plugin.getRaceManager();

switch (identifier) { case "1": return raceManager.getPlayerNameByRank(1); case "2": return raceManager.getPlayerNameByRank(2); case "3": return raceManager.getPlayerNameByRank(3); case "sira": return String.valueOf(raceManager.getPlayerRank(player)); case "tur": return String.valueOf(raceManager.getCurrentLap(player)); case "kalan_sure": return String.valueOf(raceManager.getRemainingTime()); case "oyuncu_sayisi": return String.valueOf(raceManager.getPlayerCount()); default: return ""; } } }

Also add these methods to RaceManager.java if they don't exist:

  • public String getPlayerNameByRank(int rank)
  • public int getPlayerRank(Player player)
  • public int getCurrentLap(Player player)
  • public int getRemainingTime()
  • public int getPlayerCount()

And make sure RaceManager has a getter method to access it from BotYarisiPlugin:

  • public RaceManager getRaceManager()
Kodari AI
KodariJun 9 at 3:39 pm 86
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
plugin.yml
Code
12 2,108
src/main/java/me/pyrion/botyarisi/BotYarisiPlugin.java
package me.pyrion.botyarisi;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class BotYarisiPlugin extends JavaPlugin {

    private PlayerDataManager playerDataManager;
    private StartZoneManager startZoneManager;
    private CheckpointManager checkpointManager;
    private PowerUpManager powerUpManager;
    private RaceManager raceManager;
    private CommandManager commandManager;
    private EventListener eventListener;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        reloadConfig();

        this.playerDataManager = new PlayerDataManager(this);
        this.startZoneManager = new StartZoneManager(this);
        this.checkpointManager = new CheckpointManager(this);
        this.powerUpManager = new PowerUpManager(this);
        this.raceManager = new RaceManager(this);

        this.eventListener = new EventListener(this);
        Bukkit.getPluginManager().registerEvents(eventListener, this);

        this.commandManager = new CommandManager(this);
        commandManager.register();

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new BotYarisiExpansion(this).register();
            getLogger().info("PlaceholderAPI entegrasyonu aktif.");
        }

        getLogger().info("BotYarisi v" + getDescription().getVersion() + " aktif!");
    }

    @Override
    public void onDisable() {
        if (raceManager != null) {
            raceManager.stopAllTasks();
        }
        if (powerUpManager != null) {
            powerUpManager.stopSpawning();
        }
        getLogger().info("BotYarisi devre dışı.");
    }

    public PlayerDataManager getPlayerDataManager() { return playerDataManager; }
    public StartZoneManager getStartZoneManager() { return startZoneManager; }
    public CheckpointManager getCheckpointManager() { return checkpointManager; }
    public PowerUpManager getPowerUpManager() { return powerUpManager; }
    public RaceManager getRaceManager() { return raceManager; }
    public CommandManager getCommandManager() { return commandManager; }
}