crocoleksii1

A 3 seater plane. The person who spawns the plane becomes it's owner. They can right click while in the plane to access a menu where they can make it so that only certain players can get in, no one can get in or everyone can get in. Also in that menu they can kick out people who are currently in the plane and they can transfer ownership which kicks them out of the plane and lets another player fly the plane. Also, op'd users can fly any plane. To remove the plane the player or op'd players can shift left click it to remove it from the ground and get back the plane spawner. The controls are: W to go forward, move your camera to change the plane's direction, left shift to get out. If the person flying the plane gets out mid-air, the plane stops and just drops down onto the land below it.

Kodari AI
KodariJun 22 at 7:28 pm 90
PlanesPlugin
A 3-seater plane plugin where placing a compass spawner spawns a rideable plane. The owner flies from the pilot seat, camera controls direction/altitude, W moves forward (Paper) or always-on fallback. Passengers right-click any seat to board. Owner right-clicks in-seat to open a settings GUI: access modes (everyone/owner-only/whitelist), kick riders, manage whitelist, and transfer ownership. Shift+left-click removes the plane and returns the spawner. Planes drop smoothly when the pilot exits mid-air. OPs bypass access checks.

Here’s the full plan:

  1. build.gradle + plugin.yml

  2. PlaneItem — spawner item utility

  3. PlaneManager — active plane registry + entity→plane lookup

  4. Plane — ArmorStand composition, offset math, rider tracking, movement

  5. PlaneMovementTask — per-tick flight + drop logic

  6. PlaneInputListener — Paper PlayerInputEvent for W-key tracking

  7. PlaneListener — spawn, board, remove, exit events

  8. PlaneMenuGUI — main/whitelist/transfer GUI pages

  9. PlaneCommand — /plane [player]

  10. PlanePlugin — wires everything together

Here’s a summary of everything built:

Mechanics

  • /plane gives the owner a Compass Plane Spawner — right-click any solid block to place a 3-seat plane facing the player’s direction; the item is consumed

  • Boarding: right-click any part of the plane — pilot seat filled first, then two passenger seats

  • Flight: camera yaw + pitch (clamped ±45°) steers direction and altitude; W key required on Paper servers, auto-move fallback on Spigot

  • Exit: Shift dismounts the rider; if the pilot exits mid-air the plane enters drop mode (smooth gravity) until it lands on solid ground

  • Removal: Shift+Left-click any plane part (owner or OP) — all entities are removed and the spawner is dropped

Settings Menu (owner right-clicks while seated)

Row
Contents
1
Access mode buttons: Everyone / Owner Only / Whitelist (selected highlighted with ★)
1 slot 4
Manage Whitelist page (visible only in Whitelist mode)
2
Skull heads for current riders — click to kick
3
Transfer Ownership → pick any online player (owner ejected, new owner notified)

Permissions: planes.give (OP default) · planes.give.others (OP default)

crocoleksii1

well the plane doesnt appear and basically all of it is broken.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 1,083
src/main/java/com/kodari/planes/PlanePlugin.java
package com.kodari.planes;

import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class PlanePlugin extends JavaPlugin {

    @Getter private static PlanePlugin instance;
    @Getter private PlaneManager planeManager;
    @Getter private PlaneMenuGUI planeMenuGUI;
    @Getter private final Map<UUID, Boolean> forwardInput = new HashMap<>();
    @Getter private boolean paperInputAvailable = false;

    @Override
    public void onEnable() {
        instance = this;
        planeManager = new PlaneManager(this);
        planeMenuGUI = new PlaneMenuGUI(this);

        getServer().getPluginManager().registerEvents(new PlaneListener(this), this);
        getServer().getPluginManager().registerEvents(planeMenuGUI, this);
        getCommand("plane").setExecutor(new PlaneCommand(this));

        try {
            Class.forName("io.papermc.paper.event.player.PlayerInputEvent");
            new PlaneInputListener(this).register(this);
            paperInputAvailable = true;
            getLogger().info("Paper input detection enabled — W key controls flight.");
        } catch (ClassNotFoundException ignored) {
            getLogger().info("Paper input unavailable — plane moves automatically while piloted.");
        }

        new PlaneMovementTask(this).runTaskTimer(this, 0L, 1L);
        getLogger().info("PlanesPlugin enabled.");
    }

    @Override
    public void onDisable() {
        if (planeManager != null) {
            planeManager.removeAllPlanes();
        }
    }
}