From 1b18797ad567046275d0f93cfcc246be19104e66 Mon Sep 17 00:00:00 2001 From: FabianGal45 Date: Sun, 2 May 2021 22:31:48 +0100 Subject: [PATCH] Added ongoing rent to Config --- src/me/EtienneDx/RealEstate/Config.java | 2 ++ src/me/EtienneDx/RealEstate/Transactions/ClaimRent.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/me/EtienneDx/RealEstate/Config.java b/src/me/EtienneDx/RealEstate/Config.java index 4aab32b..e1c5a9b 100644 --- a/src/me/EtienneDx/RealEstate/Config.java +++ b/src/me/EtienneDx/RealEstate/Config.java @@ -37,6 +37,8 @@ public class Config extends AnnotationConfig public String cfgReplaceRent = "FOR RENT"; @ConfigField(name="RealEstate.Keywords.Replace.Lease", comment = "What is displayed on signs for preoperties to lease") public String cfgReplaceLease = "FOR LEASE"; + @ConfigField(name="RealEstate.Keywords.Replace.Ongoing.Rent", comment = "What is displayed on the first line of the sign once someone rents a claim.") + public String cfgReplaceOngoingRent = "[Rented]"; @ConfigField(name="RealEstate.Rules.Sell", comment = "Is selling claims enabled?") public boolean cfgEnableSell = true; diff --git a/src/me/EtienneDx/RealEstate/Transactions/ClaimRent.java b/src/me/EtienneDx/RealEstate/Transactions/ClaimRent.java index 2a537d4..e57cfeb 100644 --- a/src/me/EtienneDx/RealEstate/Transactions/ClaimRent.java +++ b/src/me/EtienneDx/RealEstate/Transactions/ClaimRent.java @@ -122,7 +122,7 @@ public class ClaimRent extends BoughtTransaction else if(sign.getBlock().getState() instanceof Sign) { Sign s = (Sign) sign.getBlock().getState(); - s.setLine(0, ChatColor.GOLD + "[Rented]"); //Changed the header to "[Rented]" so that it won't waste space on the next line and allow the name of the player to show underneath. + s.setLine(0, ChatColor.GOLD + RealEstate.instance.config.cfgReplaceOngoingRent); //Changed the header to "[Rented]" so that it won't waste space on the next line and allow the name of the player to show underneath. s.setLine(1, Utils.getSignString(Bukkit.getOfflinePlayer(buyer).getName()));//remove "Rented by" s.setLine(2, "Time remaining : ");