Skip to content
Lunluns-WorldPublic
forked from Zrips/Residence

About

Residence Bukkit Plugin

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2,605 Commits

Folders and files

Repository files navigation

Residence

Residence is different from most protection plugins in that it allows users to protect their own homes without needing to bother the server administrator.

It supports a variety of protection types, including preventing movement through protected areas. All settings can be configured by the landowner, with limits defined by the admin.


📜 Credit

Original plugin created by bekvon and later made premium with their permission to further development.


📦 Source and Downloads


⚙️ Maven Setup

Residence is available via JitPack (https://jitpack.io/), making integration into your Maven project simple.

Add the repository to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Add the dependency:

<dependency>
    <groupId>com.github.Zrips</groupId>
    <artifactId>Residence</artifactId>
    <version>6.0.0.1</version>
    <scope>provided</scope>
</dependency>

This will include Residence in your project, allowing you to use its API and functionality directly.


Database storage and cross-server residences

Residence uses YAML by default. For a shared database, set Storage.Type to MARIADB, MYSQL, or POSTGRESQL and configure Host, Port, Database, Username, and Password. Use port 5432 for a default PostgreSQL installation. A new server record can load the existing YAML save on its first start. Back up plugins/Residence/Save before changing the storage backend.

Enable CrossServer.Enabled on each backend, point all backends at the same database and table prefix, and give each one its own CrossServer.ServerName. The name must match the proxy's backend registration. For Velocity, enable its BungeeCord plugin messaging compatibility. Velocity plugin messaging

  • /res list includes the player's residences on other backends.
  • /res tp <server>:<residence> sends the player to the destination backend. That backend applies its local Residence teleport rules.
  • /res gui opens the Residence browser, with server filtering, owned residences, pins, likes, market access, and local management actions (including sell/rent market management). ResidenceList inspired the browser workflow.
  • /res market, /res market gui [all|sell|rent|myrent], and /res market list [sell|rent] open the interactive Market GUI for browsing, teleporting to inspect, buying, renting, renewing, toggling autopay, unrenting, and listing/unlisting owned residences (append text to /res market list for classic chat output).
  • CrossServer.GlobalResidenceLimit shares the player residence limit across the configured backends.
  • CrossServer.ServerDisplayNames maps backend server IDs (e.g. server-1: "&aSurvival 1") to friendly display names shown in /res gui, /res list, and teleport messages (hot-reloadable via /res reload config).
  • Cross-server-safe AutoCleanUp: player join/quit activity is recorded monotonically in res_player_activity across all backends. AutoCleanUp uses the latest cross-server activity timestamp, skips unknown (lastPlayed <= 0) owners and residences with active renters, awaits LuckPerms offline permission checks fail-safely, preserves all residence/player flags when transferring (AutoCleanUp.KeepFlagsOnTransfer: true), and automatically restores ownership with original flags if the previous owner returns on any backend (AutoCleanUp.AutoRestoreOnReturn: true, tracked in res_cleanup_reclaim / Save/cleanup_reclaim.yml). Start each backend once before enabling AutoCleanUp so existing offline timestamps are seeded into the shared database.
  • Global.Optimizations.KeepFlagsOnOwnerTransfer (default true): preserves existing residence & player flags by default when transferring ownership via /res give, /resadmin setowner, or /resadmin setallowner (pass -resetflags if you explicitly want to reset to defaults; /res market buy still resets flags for buyer safety).
  • Cross-server per-player residence count & size limits (/resadmin limit <player> <add|remove|set|reset|info> [res|x|y|z|size|subzones|rents|all] [amount]): persisted atomically in res_player_limits (or Save/player_limits.yml in YAML mode), synced across backends, with numeric PlaceholderAPI placeholders (%residence_user_maxres%, %residence_user_max_x%, %residence_user_max_y%, %residence_user_max_z%, %residence_user_extra_res%, %residence_user_extra_x%, %residence_user_extra_y%, %residence_user_extra_z%, %residence_user_extra_subzones%, %residence_user_extra_rents%, %residence_user_global_amount%) for shop integrations such as UltimateShop.
  • Global.Bank.Enabled (default true): can be set to false to disable /res bank and bank-based rent deductions cleanly.

Import and export

Run the following commands from the server console.

Command Result
resadmin migrate griefprevention preview [ClaimDataPath] Read GriefPrevention claim files and show the number of claims available to import.
resadmin migrate griefprevention apply [ClaimDataPath] Import claim bounds, owner UUIDs, subdivisions, and supported trust levels. Review GP permission groups, delegation trust, and claim-block balances separately.
resadmin migrate lands preview [JsonDirectory] Read Lands through its API when the plugin is loaded. A directory argument selects compatible JSON exports.
resadmin migrate lands apply [JsonDirectory] Import supported chunk footprints and ownership. Review Lands trust roles before switching protection. The live importer skips lands with subareas.
resadmin migrate db2yaml Export the active server's SQL save under plugins/Residence/Exports/sql-*.
resadmin migrate yaml2db apply Write the loaded legacy data to a database that has no save for this server.

📚 Documentation & Resources

About

Residence Bukkit Plugin

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages