toogoodforyouonroblox

make a spawn protecton so nobody can brake or place blocks in the chunk that is at 0 63 0

Kodari AI
KodariApr 17 at 7:45 pm 4,003 (v2)

I’ll create a simple spawn protection plugin that prevents block breaking and placing in the chunk at coordinates 0, 63, 0.

SpawnProtection
A lightweight spawn protection plugin that prevents players from breaking or placing blocks in the spawn chunk (chunk 0,0 containing coordinates 0,63,0). Features configurable protection messages, bypass permissions for administrators, and toggle option. Ops automatically bypass protection. Simple, efficient, and zero-configuration required.

Created SpawnProtection plugin that protects chunk (0,0) from block breaking and placing, with bypass permission for ops and configurable protection message.

toogoodforyouonroblox

make a rtp sytem so when you do /rtp it tp you in a random cords in a 10k by 10k radius

Kodari AI
KodariApr 17 at 7:47 pm 5,259 (v2)

I’ll add an RTP system to your spawn protection plugin. Let me read the existing files first and then add the RTP command.

Now I’ll add the RTP system with random teleportation within a 10k x 10k radius.

RTP system added with /rtp command that teleports players to random coordinates within a 10k x 10k radius (±5000 blocks), includes cooldown system, safe location checking, and configurable messages.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 290
src/main/java/me/spawnprotection/SpawnProtection.java
package me.spawnprotection;

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

@Getter
public class SpawnProtection extends JavaPlugin {
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new ProtectionListener(this), this);
        getCommand("rtp").setExecutor(new RTPCommand(this));
        getLogger().info("SpawnProtection enabled - Chunk (0,0) is now protected!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("SpawnProtection disabled");
    }
    
    public boolean isProtectionEnabled() {
        return getConfig().getBoolean("enabled", true);
    }
    
    public String getProtectionMessage() {
        return ChatColor.translateAlternateColorCodes('&', 
            getConfig().getString("message", "&cYou cannot break or place blocks in the spawn chunk!"));
    }
}