Плагины/HomePlugin
HomePlugin

HomePlugin

A lightweight and efficient plugin to manage player homes and world spawns, featuring optional caching and powerful synchronization tools.

7.5K
12

🏡 HomePlugin (by fuzeblocks)

A lightweight, flexible home/spawn/teleport management plugin for Paper/Spigot servers. HomePlugin supports named homes, global spawn, TPA requests, random teleport (RTP), optional Redis caching, YAML or MySQL storage backends, multilingual support, economy integration, and a modular extension API for internal plugin modules.

Home Icon
Stable • Fast • Modular • API‑Driven


📚 Table of Contents


✨ Features

CategoryHighlights
Homes & SpawnNamed homes, GUI/list access, global spawn set/remove
Teleport SystemsTPA requests with timeout, RTP with cooldown & radius
StorageYAML (default) or MySQL (config‑selectable)
CachingOptional Redis layer (Jedis) when enabled
LimitsPer‑player home limits via permissions homeplugin.limit.<n>
ValidationPrevent unfair placements / block disabled worlds
LocalizationBuilt‑in language system (French, English, Spanish) + editable YAML
PlaceholderAPIRich placeholders for homes, counts, and locations
Admin ToolsManage other players’ homes, spawn, cache, language files
Modular LoaderInternal plugin loader to register HomePlugin modules
Tasks / WarmupDelayed teleports with titles/messages/particles
EconomyOptional costs via Vault (create/teleport/TPA/RTP)

🧾 Commands

CommandDescriptionNotes
/sethome [name] [info]Set (or overwrite) a home at your current positioninfo optional metadata
/home [name]Teleport to a home; opens GUI if no name is providedGUI depends on config
/homeOpen homes GUI (if enabled)
/delhome [name]Delete a named home
/listhomeList all your homes in chatText alternative to GUI
/renamehome [name] [newname]Rename an existing home
/relocatehome [name]Move an existing home to your current location
/backTeleport back to your previous location
/spawnTeleport to global spawnRequires spawn set
/setspawnSet global spawn at current locationAdmin
/delspawnRemove the current global spawnAdmin
/tpa <player>Send a teleport request to a playerTimes out via Tpa-duration
/tpaccept [player]Accept pending TPA requestPlayer optional
/tpdeny [player]Deny pending TPA requestPlayer optional
/rtpRandom teleport within configured radiusCooldown applies
/homeadmin <player>View/manage another player’s homesAdmin
/cache viewView cache statusAdmin
/cache clearallClear all plugin cachesAdmin
/cache player <name>Clear cache for a specific playerAdmin
/pluginsList loaded HomePlugin internal modulesAdmin (not Bukkit /plugins)
/lang updateUpdate base language files (add‑only merge)Admin
/lang mergeMerge new keys into language filesAdmin
/lang set <code>Switch active language (e.g., FRENCH)Admin

🔐 Permissions

PermissionPurposeDefault
homeplugin.command.homeUse /home (teleport/GUI)true
homeplugin.command.sethomeUse /sethometrue
homeplugin.command.delhomeUse /delhometrue
homeplugin.command.listhomeUse /listhometrue
homeplugin.command.spawnUse /spawntrue
homeplugin.command.tpaSend/accept/deny TPAtrue
homeplugin.adminAdmin features (spawn, cache, manage others)op
homeplugin.lang.updateUpdate language filesop
homeplugin.back.useUse /backop
homeplugin.limit.<n>Override max homes (1..100 scanned)permission‑based

Suggested extras (if implemented):

  • homeplugin.bypass.limit — ignore base limit
  • homeplugin.bypass.validation — ignore placement restrictions
  • homeplugin.bypass.cooldown — ignore RTP/teleport cooldowns

Dynamic limits: the plugin scans homeplugin.limit.1homeplugin.limit.100 and applies the highest held value.


🧩 PlaceholderAPI Integration

Placeholders (via HomePluginExpansion):

PlaceholderDescription
%homeplugin_homes%Comma‑separated home names (or fallback)
%homeplugin_homes_numbers%Number of homes
%homeplugin_has_homes%true if player has ≥ 1 home
%homeplugin_home_location_<name>%Formatted location (language‑aware)
%homeplugin_home_exists_<name>%true / false
%homeplugin_home_world_<name>%World name
%homeplugin_home_coordinates_<name>%Raw coordinates X Y Z

Notes:

  • <name> is case‑insensitive.
  • The expansion registers automatically when PlaceholderAPI is present.

💰 Vault Integration

Economy features are handled by EconomyManager and use Vault to integrate with supported economy plugins. Configure costs per action (create home, teleport, TPA, RTP) in config.yml.


🌍 Languages

Configured via: Config.Language
Built‑in:

  • FRENCH
  • ENGLISH
  • SPANISH (Henri Topper)

Language loading uses an enum (Language.valueOf(...)) and falls back to FRENCH if invalid. Customize by editing the shipped YAML files; use /lang update, /lang merge, and /lang set to manage versions and switch locales.


⬇️ Installation

  1. Download: place the plugin JAR into your server’s plugins/ folder.
    • Or build from source and place the resulting JAR into plugins/.
  2. Start the server once to generate configuration and language files.
  3. Adjust plugins/HomePlugin/config.yml (storage, Redis, economy, limits, etc.).
  4. Reload/restart the server.

Quick check:

  • /sethome and /home should work immediately on YAML storage.
  • If using MySQL, verify credentials and connectivity before restarting.
  • If using Redis, set UseRedis: true and ensure the host is reachable.

⚙️ Configuration

Example structure (see src/main/resources/config.yml):

Config:

  # ----------------------------------------
  # Language / Localization
  # Available: FRENCH, ENGLISH, SPANISH
  # ----------------------------------------
  Language: FRENCH

  # ----------------------------------------
  # Storage Connector
  # TYPE can be "YAML" or "MYSQL"
  # MySQL settings are used only when TYPE="MYSQL"
  # ----------------------------------------
  Connector:
    TYPE: "YAML"  # MYSQL or YAML

    # Optional (for MYSQL)
    HOST: "localhost"
    PORT: 3306
    USERNAME: "root"
    PASSWORD: ""
    DATABASE: "HomePlugin"

  # ----------------------------------------
  # Redis Cache (Optional)
  # Enable only if you need cross-instance cache/sync
  # ----------------------------------------
  Redis:
    UseRedis: false
    HOST: "localhost"
    PORT: 6379
    SSL: false
    PASSWORD: ""

  # ----------------------------------------
  # Home Settings
  # Limits, validation, and disabled worlds
  # ----------------------------------------
  Home:
    DefaultHomeLimit: 3
    PreventUnfairLocation: true
    DisabledWorlds:
      - "world_nether"
      - "world_the_end"

  # ----------------------------------------
  # Teleport Task / Warmup & Effects
  # ----------------------------------------
  Task:
    Task-duration: 3  # seconds
    UseTitle: true
    UseMessage: false
    Add-particles-after-teleport: true

  # ----------------------------------------
  # TPA (Teleport Requests)
  # ----------------------------------------
  Tpa:
    Tpa-duration: 30  # seconds

  # ----------------------------------------
  # RTP (Random Teleport)
  # ----------------------------------------
  Rtp:
    cooldown-seconds: 1000  # seconds
    max-radius: 200

  # ----------------------------------------
  # Economy (Vault)
  # Toggle costs and set prices per action
  # ----------------------------------------
  Economy:
    UseEconomy: false
    HomeCreationCost: 100.0
    Home-Teleport-Price: 50.0
    Tpa-Request-Price: 20.0
    Rtp-Price: 150.0

Key behaviors:

  • Base home limit via Config.Home.DefaultHomeLimit plus permission overrides.
  • TPA timeout uses Config.Tpa.Tpa-duration.
  • Redis initializes only when UseRedis: true.
  • Teleport warmup via Task-duration; titles/messages/particles are optional.
  • Worlds listed in DisabledWorlds cannot be used for homes/teleports (validation).

🧱 Architecture & Performance

  • Unified managers with storage abstraction:
    • Homes: HomeManager → YAML (HomeYMLManager) or SQL (HomeSQLManager)
    • Spawns: SpawnManager → YAML (SpawnYMLManager) or SQL (SpawnSQLManager)
  • Optional Redis (JedisPooled) caching/sync when enabled
  • MySQL path enabled by Config.Connector.TYPE=MYSQL
  • Extension system (PluginLoader / PluginManager) for internal modules
  • PlaceholderAPI soft‑dependency
  • Permission‑driven home limits (homeplugin.limit.<n>)
  • Teleport warmups and TPA expiration via Bukkit scheduler

🧑‍💻 Developer / Extension API

  • Events, managers, and language tools with documented APIs
  • Detect active backend:
    • From events: SyncMethod getType()
    • Globally: fr.fuzeblocks.homeplugin.HomePlugin.getRegistrationType()

Docs:

Use JitPack to depend on the API (replace Tag with a release/tag):

Maven:

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>
<dependency>
  <groupId>com.github.fuzeblocks</groupId>
  <artifactId>HomePlugin</artifactId>
  <version>Tag</version>
</dependency>

Gradle (Groovy):

repositories { maven { url 'https://jitpack.io' } }
dependencies { implementation 'com.github.fuzeblocks:HomePlugin:Tag' }

Gradle (Kotlin):

repositories { maven("https://jitpack.io") }
dependencies { implementation("com.github.fuzeblocks:HomePlugin:Tag") }

✅ Compatibility

  • Declared api-version: 1.14 (plugin.yml)
  • Built for modern Paper/Spigot derivatives
  • Soft‑dependency: PlaceholderAPI
  • Storage: YAML (default) or MySQL (when enabled)

🗺️ Roadmap

FeatureStatus
Per‑home economy cost✅ Complete
Offline player home editing📝 Planned
Edit existing homes✅ Complete
Public homes📝 Planned
/back command✅ Complete
Clickable chat messages📝 Planned
Warps📝 Planned
UI/style refresh📝 Planned
BlueMap and Dynmap integration📝 Planned

Suggestions welcome via Discussions or Discord.


🤝 Support & Contributions

  • Issues: Use GitHub Issues for bugs/feature requests
  • Discord: Join the server
  • Pull Requests: Use clear commit messages; discuss large changes beforehand

Contribution flow:

  1. Fork
  2. Create a feature branch
  3. Commit changes
  4. Open a PR referencing related issues

📄 License

Apache‑2.0

Совместимость

Minecraft: Java Edition

1.20–1.21.101.18–1.19.41.16–1.17.11.14–1.15.2

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:Apache-2.0
Опубликован:1 год назад
Обновлён:1 неделю назад
Главная