user125135135135

zrob mi random tp , ze jak wpisze komende /rtp to mnie tepmnie w ranodm,owe miejsce na siwiecie i przewsztkim bezpieczne

Kodari AI
KodariJul 2 at 9:15 am 1
RandomTeleport
A lightweight random teleport plugin that safely teleports players to random locations on the world. Features include configurable radius, center point, cooldown system with bypass permission, and comprehensive safety checks (no lava, water, cactus, or suffocation). Uses highest-block detection to ensure players always land on solid ground with head space.
user125135135135

wez narpaw bo nie telofurtje wogule zrob ze odrazu po wpsianiu /rtp PRZETPTOWUJE w rnadowmoe miejsce na swiecie i bezpiecznie

Kodari AI
KodariJul 2 at 9:45 am 1

Naprawione. Problem był w TeleportUtils.java — teleport ustawiał gracza na highestY (czyli W środek bloku ziemi zamiast NA niego). Teraz gracz ląduje nad blokiem gruntu (highestY + 1), a sprawdzanie bezpieczeństwa też bierze właściwe bloki: grunt poniżej, nogi i głowa nad.

Wpisz /rtp i powinno działać od razu — teleport w losowe bezpieczne miejsce.

user125135135135

nie dziala

Kodari AI
KodariJul 2 at 9:47 am 1

[Generation stopped]

user125135135135

jednak dziala

Kodari AI
KodariJul 2 at 9:48 am 1

Działa 💪

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 229
src/main/java/com/rtp/RTPPlugin.java
package com.rtp;

import org.bukkit.plugin.java.JavaPlugin;

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

public class RTPPlugin extends JavaPlugin {

    private Map<UUID, Long> cooldowns;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        cooldowns = new HashMap<>();
        getCommand("rtp").setExecutor(new RTPCommand(this));
        getLogger().info("RandomTeleport enabled!");
    }

    @Override
    public void onDisable() {
        cooldowns.clear();
        getLogger().info("RandomTeleport disabled!");
    }

    public Map<UUID, Long> getCooldowns() {
        return cooldowns;
    }
}