A

Develop a Minecraft Paper plugin for version 1.21.11 that allows players to create a portal using soul sand, ignited with flint and steel, which transports them to a new dimension called the Soul Dimension. This dimension should exclusively consist of soul sand terrain and feature unique biomes, mobs, and resources related to souls. Include configurable portal locations, dimension settings, and permission support for accessing the Soul Dimension.

Kodari AI
KodariJun 23 at 3:40 pm 17

I’ll create a Soul Dimension portal plugin for Paper 1.21.11.

SoulDimension
A Paper plugin that introduces a custom Soul Dimension accessible through soul sand portals. Players build portal frames with soul sand and ignite them with flint and steel to travel to a mysterious realm filled with soul-themed terrain, biomes, and entities. Features include configurable portal mechanics, custom world generation with soul sand landscapes, permission-based access control, and admin commands for dimension management. The Soul Dimension provides unique resources and challenges for adventurous players.

Done! I’ve created a complete Soul Dimension plugin with the following features:

Core Features:

  • Soul sand portal creation (rectangular frames, minimum 2x3, customizable size)

  • Portal ignition with flint and steel

  • Bidirectional teleportation (overworld ↔ soul dimension)

  • Automatic return portal generation

  • Teleportation cooldown system

  • Permission-based access control

Soul Dimension World:

  • Custom terrain generation using soul sand and soul soil

  • Varied terrain height with simplex noise

  • Soul campfires and basalt decorations

  • Soul fire elements scattered throughout

  • Configurable spawn point and world border

Configuration:

  • Portal size limits (min/max width and height)

  • Teleport cooldown duration

  • World settings (weather, time, border)

  • Customizable messages

  • Toggle for portal features

Commands:

  • /souldimension tp [player] - Direct teleportation

  • /souldimension reload - Reload configuration

Permissions:

  • souldimension.portal.create - Create portals (default: true)

  • souldimension.portal.use - Use portals (default: true)

  • souldimension.teleport - Direct teleport command (op only)

  • souldimension.admin - Admin commands (op only)

The plugin generates a unique dimension with soul-themed terrain, handles portal detection and creation similar to Nether portals, and includes full configuration options for customization.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 848
src/main/java/com/souldimension/SoulDimension.java
package com.souldimension;

import com.souldimension.commands.SoulDimensionCommand;
import com.souldimension.handlers.PortalTeleportHandler;
import com.souldimension.listeners.PortalListener;
import com.souldimension.world.SoulChunkGenerator;
import lombok.Getter;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

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

@Getter
public class SoulDimension extends JavaPlugin {

    private World soulWorld;
    private PortalTeleportHandler teleportHandler;
    private final Map<UUID, Long> portalCooldowns = new HashMap<>();

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        loadSoulDimension();
        
        this.teleportHandler = new PortalTeleportHandler(this);
        
        getServer().getPluginManager().registerEvents(new PortalListener(this), this);
        
        getCommand("souldimension").setExecutor(new SoulDimensionCommand(this));
        
        getLogger().info("Soul Dimension has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("Soul Dimension has been disabled!");
    }

    private void loadSoulDimension() {
        FileConfiguration config = getConfig();
        String worldName = config.getString("dimension.world-name", "soul_dimension");
        
        getLogger().info("Loading Soul Dimension world: " + worldName);
        
        WorldCreator creator = new WorldCreator(worldName);
        creator.environment(World.Environment.NORMAL);
        creator.type(WorldType.NORMAL);
        creator.generator(new SoulChunkGenerator());
        
        this.soulWorld = creator.createWorld();
        
        if (soulWorld != null) {
            soulWorld.setKeepSpawnInMemory(true);
            
            boolean weather = config.getBoolean("dimension.environment.weather", false);
            soulWorld.setStorm(weather);
            soulWorld.setThundering(false);
            
            int fixedTime = config.getInt("dimension.environment.fixed-time", -1);
            if (fixedTime >= 0) {
                soulWorld.setGameRule(org.bukkit.GameRule.DO_DAYLIGHT_CYCLE, false);
                soulWorld.setTime(fixedTime);
            }
            
            int borderSize = config.getInt("dimension.world-border", 10000);
            if (borderSize > 0) {
                soulWorld.getWorldBorder().setCenter(0, 0);
                soulWorld.getWorldBorder().setSize(borderSize);
            }
            
            getLogger().info("Soul Dimension world loaded successfully!");
        } else {
            getLogger().severe("Failed to load Soul Dimension world!");
        }
    }

    public void reloadPluginConfig() {
        reloadConfig();
        getLogger().info("Configuration reloaded!");
    }

    public boolean isInCooldown(UUID playerId) {
        if (!portalCooldowns.containsKey(playerId)) {
            return false;
        }
        
        long cooldownTime = getConfig().getInt("portal.teleport-cooldown", 5) * 1000L;
        long lastUse = portalCooldowns.get(playerId);
        
        return System.currentTimeMillis() - lastUse < cooldownTime;
    }

    public void setCooldown(UUID playerId) {
        portalCooldowns.put(playerId, System.currentTimeMillis());
    }

    public String getMessage(String path) {
        return getConfig().getString("messages." + path, "")
                .replace("&", "§");
    }
}