Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.classpath
.project
.idea
Expand All @@ -7,4 +8,7 @@ target/*
build.bat
/bin/
/target/
.vscode
.vscode
report.cmd
report.txt
javadoc.cmd
71 changes: 69 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,75 @@
# Changelog

## 1.4.1
# Version 1.4.3 (2025-02-14)

## New Features

- **Admin Claim Detection:**
- Improved the WorldGuard integration so that claims with no owner (i.e. an empty owner field) are now treated as admin claims.
- In such cases, the claim’s owner is set to a constant `SERVER_UUID` (and displayed as "SERVER") for consistency in sign updates and transaction validations.

- **Instant Sign Update for Rent/Lease:**
- Modified the ClaimRent and ClaimLease update logic to update signs instantly—bringing their behavior in line with ClaimSell—so that players see the correct information immediately after placement.

## Bug Fixes

- **Owner Verification Issue:**
- Fixed an issue where players were incorrectly receiving the “You can only sell/rent/lease claim you own!” message on sign interaction.
- The plugin now correctly determines claim ownership (including admin claims) using the updated WGClaim methods.

- **Database Migration for Admin Claims:**
- Updated the SQL insert logic so that if a claim is detected as an admin claim, the owner field is set to the SERVER identifier.
- This change ensures consistent behavior when loading data from the database.

- **WorldGuard Integration Problems:**
- Resolved compatibility issues with WorldGuard and WorldEdit by updating our WGClaim implementation and adjusting our import statements.
- The plugin now properly retrieves regions and their flags using the latest WorldGuard API.

## Improvements

- **Code Refactoring:**
- Cleaned up various sections of the code for better readability and maintainability.
- Improved error handling and logging to make troubleshooting easier.

- **Build & Dependency Updates:**
- Updated the `pom.xml` to ensure proper integration with the latest versions of WorldGuard, WorldEdit, Vault, and other dependencies.

- **Documentation & Messaging:**
- Revised in-game messages and log outputs to provide clearer feedback for both players and administrators.


# Version 1.4.2 (2025-02-13)
### Admin Claim Support Improvements:
* When processing ClaimRent transactions, if a claim is identified as an admin claim, its owner is now set to "SERVER" (using a fixed UUID or identifier) to ensure correct behavior.
* The INSERT statements for ClaimRent now conditionally set the owner to SERVER if the claim is an admin claim.

### Sign Update Consistency:
* Modified ClaimSell to update its sign immediately after creation.
* Updated ClaimRent to also perform an immediate sign update (by scheduling a one-tick delay) so that rental signs display correct information instantly.
* Updated ClaimLease to also perform an immediate sign update (by scheduling a one-tick delay) so that rental signs display correct information instantly.
* Updated ClaimAuction to also perform an immediate sign update (by scheduling a one-tick delay) so that rental signs display correct information instantly.

### Database Handling Enhancements:
* Fixed issues with UUID parsing when loading transactions from the database.
* Improved error checking for owner values during data load to prevent invalid UUID strings.

### Code Quality and Refactoring:
* Cleaned up repeated code between transaction types and centralized common behavior (e.g., sign updating and logging).
** Added missing getter methods for ClaimAuction, ClaimLease, ClaimRent, and ClaimSell to support proper database operations.
* Renamed the old transactions.data file to transactions.yml. (The plugin will automatically reformat if the old file is detected)
** This will be helpful for future upgrades.

### Dependency and Compatibility:
* Ensured compatibility with the latest versions of Vault, EssentialsX, GriefPrevention, and GriefDefender.
** Added paper-plugin.yml to ensure Paper servers load the plugins in the correct order.
** Updated the plugin's plugin.yml and paper-plugin.yml for API version 1.21.4.

### General Bug Fixes:
* Resolved a bug where the sign for [sell] transactions remained blank.
* Addressed potential null pointer exceptions during claim data loading.
* Improved logging to capture and record transaction events more clearly.

## 1.4.1
### Added
* Added support for multiple languages files within the jar
* Added `pt-br` as a language option
Expand All @@ -12,7 +80,6 @@
* Fixed #51 regarding a duplicate prefix on `/re info`

## 1.4.0

### Added
* Readme and changelog files
* Error messages to *messages.yml*
Expand Down
37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
![RealEstate logo](https://cdn.michael-burgess.xyz/minecraft/plugins/realestate/logo.png)
# RealEstate

RealEstate is a spigot plugin built on top of GriefPrevention to provide players with an ability to sell and rent claims to other players.
RealEstate is a comprehensive Minecraft plugin that empowers players and administrators to sell, rent, lease, and auction land claims managed by popular protection plugins such as GriefPrevention, GriefDefender, WorldGuard, and Towny. Integrated with Vault for economy and permissions, RealEstate offers intuitive sign-based interactions, detailed transaction logging, and seamless compatibility with multiple claim management systems, making real estate management in Minecraft both engaging and efficient.

The plugin is documented in the [GitHub wiki](https://github.com/EtienneDx/RealEstate/wiki).
The plugin is documented [here](https://www.michael-burgess.xyz/minecraft-plugins/realestate/).

Javadoc can be found [here](https://www.michael-burgess.xyz/minecraft-plugins/realestate/javadoc).

Original Wiki can be found [here](https://github.com/EtienneDx/RealEstate/wiki).

Please feel free to report any issue in the [GitHub Issue section](https://github.com/EtienneDx/RealEstate/issues).

## GriefPrevention

This plugin is dependent on GriefPrevention version 16.18 and up.
## Real Estate Dependencies:
You MUST include at least ONE of the following plugins:

GriefPrevention plugin can be found [here](https://github.com/GriefPrevention/GriefPrevention).

GriefDefender plugin can be found [here](https://www.spigotmc.org/resources/1-12-2-1-21-4-griefdefender-claim-plugin-grief-prevention-protection.68900/).

WorldGuard plugin can be found [here](https://dev.bukkit.org/projects/worldguard).

Towny plugin can be found [here](https://www.spigotmc.org/resources/towny-advanced.72694/).

## Translation
We are looking to increase our language locale. If you speak multiple languages, you can help contribute to our project.


Many of the strings can be translated automatically, but we do need help with the more complex strings, and to confirm that the automatic translations are correct.

GriefPrevention plugin can be found [here](https://github.com/TechFortress/GriefPrevention).
[![gitlocalized ](https://gitlocalize.com/repo/10023/whole_project/badge.svg)](https://gitlocalize.com/repo/10023?utm_source=badge)
| Language | Locale | GitLocalize Status | Merged into RealEstate | Contributors |
| ------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | --------------------------------------------------------- |
| [French](https://gitlocalize.com/repo/10023/fr/resources/languages/en-us.yml) | France | [![gitlocalized](https://gitlocalize.com/repo/10023/fr/badge.svg)](https://gitlocalize.com/repo/10023/fr/resources/languages/en-us.yml?utm_source=badge) | Not yet | Looking for a Volunteer |
| [Chinese](https://gitlocalize.com/repo/10023/zh-CN/resources/languages/en-us.yml) | China | [![gitlocalized](https://gitlocalize.com/repo/10023/zh-CN/badge.svg)](https://gitlocalize.com/repo/10023/zh-CN/resources/languages/en-us.yml?utm_source=badge) | Not yet | Looking for a Volunteer |
| [Russian](https://gitlocalize.com/repo/10023/ru/resources/languages/en-us.yml) | Russia | [![gitlocalized](https://gitlocalize.com/repo/10023/ru/badge.svg)](https://gitlocalize.com/repo/10023/ru/resources/languages/en-us.yml?utm_source=badge) | Not yet | Looking for a Volunteer |
| [Dutch](https://gitlocalize.com/repo/10023/nl-NL/resources/languages/en-us.yml) | Dutch | [![gitlocalized](https://gitlocalize.com/repo/10023/nl-NL/badge.svg)](https://gitlocalize.com/repo/10023/nl-NL/resources/languages/en-us.yml?utm_source=badge) | Not yet | [smarcelissen](https://github.com/smarcelissen) |
| [Spanish](https://gitlocalize.com/repo/10023/es-ES/resources/languages/en-us.yml) | Spanish | [![gitlocalized](https://gitlocalize.com/repo/10023/es-ES/badge.svg)](https://gitlocalize.com/repo/10023/es-ES/resources/languages/en-us.yml?utm_source=badge) | Not yet | Looking for a Volunteer |
| [Portuguese](https://gitlocalize.com/repo/10023/pt-br/resources/languages/en-us.yml) | Portuguese | [![gitlocalized](https://gitlocalize.com/repo/10023/pt-br/badge.svg)](https://gitlocalize.com/repo/10023/pt-br/resources/languages/en-us.yml?utm_source=badge) | Not yet | Looking for a Volunteer |
118 changes: 118 additions & 0 deletions paper-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: RealEstate
main: me.EtienneDx.RealEstate.RealEstate
version: ${project.version}
api-version: 1.21.4
authors:
- EtienneDx
- DmitryRendov
- SkyWalker3200
- Tadhunt
dependencies:
server:
Vault:
load: BEFORE
required: true
join-classpath: true
Essentials:
load: BEFORE
required: true
join-classpath: true
GriefPrevention:
load: BEFORE
required: false
join-classpath: true
GriefDefender:
load: BEFORE
required: false
join-classpath: true
WorldGuard:
load: BEFORE
required: false
join-classpath: true
WorldEdit:
load: BEFORE
required: false
join-classpath: true
Towny:
load: BEFORE
required: false
join-classpath: true
commands:
re:
description: Access to the claim transaction information.
usage: /<command>
aliases:
- realestate
permission: realestate.info
permission-message: You do not have access to that command!
permissions:
realestate.*:
description: Gives access to all Real Estate permissions
default: op
children:
realestate.info: true
realestate.admin: true
realestate.destroysigns: true
realestate.claim.buy: true
realestate.claim.sell: true
realestate.claim.rent: true
realestate.claim.lease: true
realestate.subclaim.buy: true
realestate.subclaim.sell: true
realestate.subclaim.rent: true
realestate.subclaim.lease: true
realestate.autorenew: true
realestate.claim.*:
description: Allows the player full access over claims
default: op
children:
realestate.claim.buy: true
realestate.claim.sell: true
realestate.claim.rent: true
realestate.claim.lease: true
realestate.subclaim.*:
description: Allows the player full access over subclaims
default: op
children:
realestate.subclaim.buy: true
realestate.subclaim.sell: true
realestate.subclaim.rent: true
realestate.subclaim.lease: true
realestate.admin:
description: Allows the player to sell and lease admin claims, as well as see
plugin informations
default: op
realestate.info:
description: Allow the player to get informations about the claim
default: true
realestate.claim.buy:
description: Allows the player to buy claims (buying, paying rents, paying leases)
default: true
realestate.claim.sell:
description: Allows the player to sell claims
default: true
realestate.claim.rent:
description: Allows the player to rent claims
default: true
realestate.claim.lease:
description: Allows the player to lease claims
default: true
realestate.subclaim.buy:
description: Allows the player to buy subclaims (buying, paying rents)
default: true
realestate.subclaim.sell:
description: Allows the player to sell subclaims
default: false
realestate.subclaim.rent:
description: Allows the player to rent subclaims
default: true
realestate.subclaim.lease:
description: Allows the player to lease subclaims
default: false
realestate.destroysigns:
description: Allows the player to destroy any sign representing a transaction
default: op
realestate.autorenew:
description: Allows the player to enable automatic renew for his rented claims
and subclaims
default: true
69 changes: 60 additions & 9 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
---
name: RealEstate
main: me.EtienneDx.RealEstate.RealEstate
version: ${project.version}
authors: [EtienneDx, DmitryRendov]
depend: [Vault, GriefPrevention]
api-version: "1.18"

authors:
- EtienneDx
- DmitryRendov
- SkyWalker3200
- Tadhunt
load: POSTWORLD
folia-supported: false # prevent Folia from loading this plugin. It's not ready yet.
depend:
- Vault
softdepend:
- GriefPrevention
- GriefDefender
- WorldGuard
- WorldEdit
- Towny
api-version: 1.21.4
commands:
re:
description: Access to the claim transaction information.
usage: /<command>
aliases: [realestate]
aliases:
- realestate
permission: realestate.info
permission-message: You do not have access to that command!

permissions:
realestate.*:
description: Gives access to all Real Estate permissions
description: Gives access to all Real Estate permissions (including admin!)
default: op
children:
realestate.info: true
Expand All @@ -25,10 +38,14 @@ permissions:
realestate.claim.sell: true
realestate.claim.rent: true
realestate.claim.lease: true
realestate.claim.auction: true
realestate.claim.bid: true
realestate.subclaim.buy: true
realestate.subclaim.sell: true
realestate.subclaim.rent: true
realestate.subclaim.lease: true
realestate.subclaim.auction: true
realestate.subclaim.bid: true
realestate.autorenew: true
realestate.claim.*:
description: Allows the player full access over claims
Expand All @@ -38,6 +55,8 @@ permissions:
realestate.claim.sell: true
realestate.claim.rent: true
realestate.claim.lease: true
realestate.claim.auction: true
realestate.claim.bid: true
realestate.subclaim.*:
description: Allows the player full access over subclaims
default: op
Expand All @@ -46,9 +65,28 @@ permissions:
realestate.subclaim.sell: true
realestate.subclaim.rent: true
realestate.subclaim.lease: true
realestate.subclaim.auction: true
realestate.subclaim.bid: true
realestate.admin:
description: Allows the player to sell and lease admin claims, as well as see plugin informations
description: Allows the player to sell and lease admin claims, as well as see
plugin informations
default: op
children:
realestate.info: true
realestate.destroysigns: true
realestate.claim.buy: true
realestate.claim.sell: true
realestate.claim.rent: true
realestate.claim.lease: true
realestate.claim.auction: true
realestate.claim.bid: true
realestate.subclaim.buy: true
realestate.subclaim.sell: true
realestate.subclaim.rent: true
realestate.subclaim.lease: true
realestate.subclaim.auction: true
realestate.subclaim.bid: true
realestate.autorenew: true
realestate.info:
description: Allow the player to get informations about the claim
default: true
Expand All @@ -64,6 +102,12 @@ permissions:
realestate.claim.lease:
description: Allows the player to lease claims
default: true
realestate.claim.auction:
description: Allows the player to auction claims
default: true
realestate.claim.bid:
description: Allows the player to bid on claims
default: true
realestate.subclaim.buy:
description: Allows the player to buy subclaims (buying, paying rents)
default: true
Expand All @@ -76,9 +120,16 @@ permissions:
realestate.subclaim.lease:
description: Allows the player to lease subclaims
default: false
realestate.subclaim.auction:
description: Allows the player to auction subclaims
default: false
realestate.subclaim.bid:
description: Allows the player to bid on subclaims
default: false
realestate.destroysigns:
description: Allows the player to destroy any sign representing a transaction
default: op
realestate.autorenew:
description: Allows the player to enable automatic renew for his rented claims and subclaims
description: Allows the player to enable automatic renew for his rented claims
and subclaims
default: true
Loading