Vann Sowle

create a plugin like this but name it Hollow Scripted core https://builtbybit.com/resources/scripted-smp-core.112306/

Kodari AI
KodariOct 23 at 7:30 pm 1
HollowScriptedCore
A comprehensive SMP core plugin providing essential server management features including player economy, banking systems, custom item crafting, and advanced permission controls. Implements a robust currency system with configurable denominations, player-to-player trading interfaces, and secure banking transactions. Features dynamic item recipes that support custom materials and enchantments, alongside an intuitive admin command suite for economy oversight. Includes automated backup systems, anti-grief protection, and customizable player rank progression. Designed for performance optimization with efficient data caching and asynchronous database operations. Provides extensive configuration options for server owners to tailor gameplay mechanics, including tax rates, transaction limits, and crafting restrictions. Integrates seamlessly with existing permission systems while offering standalone functionality for vanilla environments. Includes comprehensive API for developers to extend functionality and create custom integrations.

The BuiltByBit page blocks access, so I can’t verify its exact feature list. I’m building Hollow Scripted Core as a configurable SMP essentials core.

  1. Set up the Paper plugin and default configuration.

  2. Add persistent spawn, homes, and return locations.

  3. Add teleport requests and the related player commands.

Created Hollow Scripted Core with configurable messages and home limits, plus /spawn, /setspawn, /home, /sethome, /delhome, /tpa, /tpaccept, /tpdeny, and /back. Homes, spawn, and return locations persist across restarts.

The BuiltByBit listing returned HTTP 403, so I couldn’t verify its exact feature set. This is an SMP essentials core, not a feature-for-feature copy of the listing.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 529
src/main/java/com/hollow/scriptedcore/HollowScriptedCore.java
package com.hollow.scriptedcore;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public final class HollowScriptedCore extends JavaPlugin implements Listener {
    private File dataFile;
    private YamlConfiguration data;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        dataFile = new File(getDataFolder(), "data.yml");
        data = YamlConfiguration.loadConfiguration(dataFile);

        CoreCommand commandHandler = new CoreCommand(this);
        for (String commandName : Set.of("spawn", "setspawn", "home", "sethome", "delhome", "tpa", "tpaccept", "tpdeny", "back")) {
            PluginCommand command = getCommand(commandName);
            if (command != null) {
                command.setExecutor(commandHandler);
                command.setTabCompleter(commandHandler);
            }
        }
        getServer().getPluginManager().registerEvents(this, this);
    }

    @Override
    public void onDisable() {
        saveData();
    }

    public Location getSpawn() {
        return data.getLocation("spawn");
    }

    public void setSpawn(Location location) {
        data.set("spawn", location);
        saveData();
    }

    public Location getHome(UUID playerId, String homeName) {
        return data.getLocation("players." + playerId + ".homes." + homeName);
    }

    public Set<String> getHomes(UUID playerId) {
        ConfigurationSection homes = data.getConfigurationSection("players." + playerId + ".homes");
        return homes == null ? Collections.emptySet() : homes.getKeys(false);
    }

    public void setHome(UUID playerId, String homeName, Location location) {
        data.set("players." + playerId + ".homes." + homeName, location);
        saveData();
    }

    public void deleteHome(UUID playerId, String homeName) {
        data.set("players." + playerId + ".homes." + homeName, null);
        saveData();
    }

    public int getMaxHomes() {
        return Math.max(1, getConfig().getInt("homes.max-per-player", 3));
    }

    public Location getBackLocation(UUID playerId) {
        return data.getLocation("players." + playerId + ".back");
    }

    public void setBackLocation(UUID playerId, Location location) {
        data.set("players." + playerId + ".back", location);
        saveData();
    }

    public void send(org.bukkit.command.CommandSender sender, String key, String... replacements) {
        String message = getConfig().getString("messages." + key, "&cMissing message: " + key);
        String prefix = getConfig().getString("prefix", "");
        message = message.contains("%prefix%")
                ? message.replace("%prefix%", prefix)
                : prefix + message;
        for (int i = 0; i + 1 < replacements.length; i += 2) {
            message = message.replace("%" + replacements[i] + "%", replacements[i + 1]);
        }
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', message));
    }

    @EventHandler
    public void onPlayerTeleport(PlayerTeleportEvent event) {
        if (event.getCause() != PlayerTeleportEvent.TeleportCause.PLUGIN && event.getFrom().getWorld() != null) {
            setBackLocation(event.getPlayer().getUniqueId(), event.getFrom());
        }
    }

    @EventHandler
    public void onPlayerDeath(PlayerDeathEvent event) {
        setBackLocation(event.getEntity().getUniqueId(), event.getEntity().getLocation());
    }

    private void saveData() {
        if (data == null || dataFile == null) {
            return;
        }
        try {
            if (!getDataFolder().exists() && !getDataFolder().mkdirs()) {
                getLogger().warning("Could not create the plugin data directory.");
                return;
            }
            data.save(dataFile);
        } catch (IOException exception) {
            getLogger().severe("Could not save player data: " + exception.getMessage());
        }
    }
}