mankashbijarania20-oss

Hi make plugin the that a player can set multiply homes like 8 homes

Kodari AI
KodariJun 23 at 10:48 am 13

I’ll create a home management plugin that allows players to set multiple home locations.

MultiHomes
A comprehensive home teleportation system allowing players to set and manage multiple home locations. Players can set up to 8 named homes, teleport between them instantly, and manage their collection with intuitive commands. Features include configurable home limits, customizable messages, teleportation cooldowns, and admin tools for managing player homes. All home data persists across server restarts with efficient YAML storage.

Plugin created! Players can now:

  • /sethome [name] - set up to 8 homes (default name: “home”)

  • /home <name> - teleport with 3-second delay

  • /delhome <name> - delete a home

  • /homes - view all homes with coordinates

  • /homeadmin <player> <list|delete|clear> - admin management

Features:

  • Configurable home limit (default: 8)

  • Teleport delay with movement cancellation

  • Optional cooldowns

  • YAML persistence

  • Full admin controls

mankashbijarania20-oss

Can you make it in 1.21.11 and make it like in a file

Kodari AI
KodariJun 23 at 11:11 am 15

I’ll update the plugin for 1.21.1 and ensure all homes are stored in individual YAML files per player.

Perfect! The plugin is already set for 1.21.1. Let me update it to store each player’s homes in separate files (one file per player) instead of one big file. This is cleaner and more organized.

Wait, let me fix that properly:

I see there’s an issue with the file. Let me rewrite it properly:

Perfect! ✅ Updated for Minecraft 1.21.1 with individual file storage!

What Changed:

File Storage System:

  • Each player now has their own file: plugins/MultiHomes/homes/<player-uuid>.yml

  • Much cleaner and more organized than one big file

  • Better performance when many players have homes

Example file structure:

Plain Text
plugins/MultiHomes/
├── config.yml
└── homes/
    ├── 12345678-1234-1234-1234-123456789012.yml
    ├── 87654321-4321-4321-4321-210987654321.yml
    └── ...

Each player file looks like:

YAML
homes:
  home:
    world: world
    x: 123.5
    y: 64.0
    z: -456.2
    yaw: 90.0
    pitch: 0.0
  mine:
    world: world
    x: 789.1
    y: 12.0
    z: -234.5
    yaw: 180.0
    pitch: 45.0

Everything works exactly the same for players — they just use the commands and all their homes are saved in their personal file!

mankashbijarania20-oss

Make it like zip file

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 788
src/main/java/com/kodari/multihomes/MultiHomes.java
package com.kodari.multihomes;

import com.kodari.multihomes.commands.*;
import com.kodari.multihomes.manager.PlayerHomeManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class MultiHomes extends JavaPlugin {
    
    private PlayerHomeManager homeManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.homeManager = new PlayerHomeManager(this);
        homeManager.loadHomes();
        
        registerCommands();
        
        getLogger().info("MultiHomes has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (homeManager != null) {
            homeManager.saveHomes();
        }
        getLogger().info("MultiHomes has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("sethome").setExecutor(new SetHomeCommand(this));
        getCommand("home").setExecutor(new HomeCommand(this));
        getCommand("delhome").setExecutor(new DelHomeCommand(this));
        getCommand("homes").setExecutor(new HomesCommand(this));
        getCommand("homeadmin").setExecutor(new HomeAdminCommand(this));
    }
    
    public String getMessage(String key) {
        String prefix = getConfig().getString("messages.prefix", "");
        String message = getConfig().getString("messages." + key, "&cMessage not found: " + key);
        return colorize(prefix + message);
    }
    
    public String getMessageRaw(String key) {
        String message = getConfig().getString("messages." + key, "&cMessage not found: " + key);
        return colorize(message);
    }
    
    public String colorize(String message) {
        return message.replace("&", "§");
    }
    
    public int getMaxHomes() {
        return getConfig().getInt("max-homes", 8);
    }
    
    public int getTeleportCooldown() {
        return getConfig().getInt("teleport-cooldown", 0);
    }
    
    public int getTeleportDelay() {
        return getConfig().getInt("teleport-delay", 3);
    }
    
    public boolean isCancelOnMove() {
        return getConfig().getBoolean("cancel-on-move", true);
    }
}