K

Привет, сделай плагин на 26.2 java 25, чтобы при команде /shimp игрок становится в режиме Спектора и может вселиться в игрока, игрок в которого вселились, не может двигаться и даже не может двигать головой, а кто вселился может управлять игроком ходить, строить, бить, крафтить, и умирать, чтобы выйти из тела надо написать /shimp stop и его переселяют в свое тело которое останется на месте где он впервые написал команду.

Kodari AI
KodariJul 26 at 9:46 am 3

Создаю плагин для вселения в игроков

Файловая система read-only — использую правильные <create> теги.

ShimpPlugin
A Minecraft plugin that allows players to possess and control other players. Use /shimp to enter spectator mode, then right-click a player to possess them. Control their movement, building, combat, crafting, and inventory. The possessed player is fully frozen (cannot move or look around). Use /shimp stop to return to your original body. If the possessed body dies, you return to your original body.&lt;/project_descriptionПонял, файловая система read-only — создаю всё через `
Shimp
Плагин для вселения в игроков на Minecraft 1.21.4. Команда /shimp переводит игрока в режим спектатора, после чего он может щелкнуть ПКМ по игроку чтобы вселиться. Вселенный игрок полностью заморожен (не может двигаться, поворачивать голову). Вселившийся управляет телом: ходит, строит, бьет, крафтит, умирает. Выход — /shimp stop, возвращает в исходное тело на прежнее место.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 600
src/main/java/com/example/shimp/ShimpPlugin.java
package com.example.shimp;

import com.example.shimp.commands.ShimpCommand;
import com.example.shimp.listener.PlayerListener;
import com.example.shimp.manager.PossessionManager;
import org.bukkit.plugin.java.JavaPlugin;

public class ShimpPlugin extends JavaPlugin {

    private PossessionManager possessionManager;

    @Override
    public void onEnable() {
        this.possessionManager = new PossessionManager(this);
        getCommand("shimp").setExecutor(new ShimpCommand(possessionManager));
        getServer().getPluginManager().registerEvents(new PlayerListener(possessionManager, this), this);
        getLogger().info("Shimp enabled!");
    }

    @Override
    public void onDisable() {
        if (possessionManager != null) {
            possessionManager.cancel();
        }
        getLogger().info("Shimp disabled!");
    }

    public PossessionManager getPossessionManager() {
        return possessionManager;
    }
}