Added mail support and optionnal sign removal
This commit is contained in:
parent
53597d7e9d
commit
f603b07ff7
13
pom.xml
13
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>Me.EtienneDx</groupId>
|
<groupId>Me.EtienneDx</groupId>
|
||||||
<artifactId>RealEstate</artifactId>
|
<artifactId>RealEstate</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.1.1-SNAPSHOT</version>
|
||||||
<name>RealEstate</name>
|
<name>RealEstate</name>
|
||||||
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
||||||
<build>
|
<build>
|
||||||
@ -74,6 +74,11 @@
|
|||||||
<id>aikar</id>
|
<id>aikar</id>
|
||||||
<url>https://repo.aikar.co/content/groups/aikar/</url>
|
<url>https://repo.aikar.co/content/groups/aikar/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<!-- EssentialsX repo -->
|
||||||
|
<repository>
|
||||||
|
<id>ess-repo</id>
|
||||||
|
<url>https://ci.ender.zone/plugin/repository/everything/</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -99,5 +104,11 @@
|
|||||||
<artifactId>acf-bukkit</artifactId>
|
<artifactId>acf-bukkit</artifactId>
|
||||||
<version>0.5.0-SNAPSHOT</version>
|
<version>0.5.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.ess3</groupId>
|
||||||
|
<artifactId>EssentialsX</artifactId>
|
||||||
|
<version>2.16.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -35,12 +35,15 @@ public class Config
|
|||||||
|
|
||||||
public boolean cfgEnableAutoRenew;
|
public boolean cfgEnableAutoRenew;
|
||||||
public boolean cfgEnableRentPeriod;
|
public boolean cfgEnableRentPeriod;
|
||||||
|
public boolean cfgDestroyRentSigns;
|
||||||
|
public boolean cfgDestroyLeaseSigns;
|
||||||
|
|
||||||
public boolean cfgTransferClaimBlocks;
|
public boolean cfgTransferClaimBlocks;
|
||||||
|
|
||||||
public boolean cfgMessageOwner;
|
public boolean cfgMessageOwner;
|
||||||
public boolean cfgMessageBuyer;
|
public boolean cfgMessageBuyer;
|
||||||
public boolean cfgBroadcastSell;
|
public boolean cfgBroadcastSell;
|
||||||
|
public boolean cfgMailOffline;
|
||||||
|
|
||||||
public double cfgPriceSellPerBlock;
|
public double cfgPriceSellPerBlock;
|
||||||
public double cfgPriceRentPerBlock;
|
public double cfgPriceRentPerBlock;
|
||||||
@ -93,11 +96,14 @@ public class Config
|
|||||||
|
|
||||||
this.cfgEnableAutoRenew = config.getBoolean("RealEstate.Rules.AutomaticRenew", true);
|
this.cfgEnableAutoRenew = config.getBoolean("RealEstate.Rules.AutomaticRenew", true);
|
||||||
this.cfgEnableRentPeriod = config.getBoolean("RealEstate.Rules.RentPeriods", true);
|
this.cfgEnableRentPeriod = config.getBoolean("RealEstate.Rules.RentPeriods", true);
|
||||||
|
this.cfgDestroyRentSigns = config.getBoolean("RealEstate.Rules.DestroySigns.Rent", false);
|
||||||
|
this.cfgDestroyLeaseSigns = config.getBoolean("RealEstate.Rules.DestroySigns.Lease", false);
|
||||||
|
|
||||||
this.cfgTransferClaimBlocks = config.getBoolean("RealEstate.Rules.TransferClaimBlocks", true);
|
this.cfgTransferClaimBlocks = config.getBoolean("RealEstate.Rules.TransferClaimBlocks", true);
|
||||||
|
|
||||||
this.cfgMessageOwner = config.getBoolean("RealEstate.Messaging.MessageOwner", true);
|
this.cfgMessageOwner = config.getBoolean("RealEstate.Messaging.MessageOwner", true);
|
||||||
this.cfgMessageBuyer = config.getBoolean("RealEstate.Messaging.MessageBuyer", true);
|
this.cfgMessageBuyer = config.getBoolean("RealEstate.Messaging.MessageBuyer", true);
|
||||||
|
this.cfgMailOffline = config.getBoolean("RealEstate.Messaging.MailOffline", true);
|
||||||
this.cfgBroadcastSell = config.getBoolean("RealEstate.Messaging.BroadcastSell", true);
|
this.cfgBroadcastSell = config.getBoolean("RealEstate.Messaging.BroadcastSell", true);
|
||||||
|
|
||||||
this.cfgPriceSellPerBlock = config.getDouble("RealEstate.Default.PricesPerBlock.Sell", 5.0);
|
this.cfgPriceSellPerBlock = config.getDouble("RealEstate.Default.PricesPerBlock.Sell", 5.0);
|
||||||
@ -136,11 +142,14 @@ public class Config
|
|||||||
|
|
||||||
outConfig.set("RealEstate.Rules.AutomaticRenew", this.cfgEnableAutoRenew);
|
outConfig.set("RealEstate.Rules.AutomaticRenew", this.cfgEnableAutoRenew);
|
||||||
outConfig.set("RealEstate.Rules.RentPeriods", this.cfgEnableRentPeriod);
|
outConfig.set("RealEstate.Rules.RentPeriods", this.cfgEnableRentPeriod);
|
||||||
|
outConfig.set("RealEstate.Rules.DestroySigns.Rent", this.cfgDestroyRentSigns);
|
||||||
|
outConfig.set("RealEstate.Rules.DestroySigns.Lease", this.cfgDestroyLeaseSigns);
|
||||||
|
|
||||||
outConfig.set("RealEstate.Rules.TransferClaimBlocks", this.cfgTransferClaimBlocks);
|
outConfig.set("RealEstate.Rules.TransferClaimBlocks", this.cfgTransferClaimBlocks);
|
||||||
|
|
||||||
outConfig.set("RealEstate.Messaging.MessageOwner", this.cfgMessageOwner);
|
outConfig.set("RealEstate.Messaging.MessageOwner", this.cfgMessageOwner);
|
||||||
outConfig.set("RealEstate.Messaging.MessageBuyer", this.cfgMessageBuyer);
|
outConfig.set("RealEstate.Messaging.MessageBuyer", this.cfgMessageBuyer);
|
||||||
|
outConfig.set("RealEstate.Messaging.MailOffline", this.cfgMailOffline);
|
||||||
outConfig.set("RealEstate.Messaging.BroadcastSell", this.cfgBroadcastSell);
|
outConfig.set("RealEstate.Messaging.BroadcastSell", this.cfgBroadcastSell);
|
||||||
|
|
||||||
outConfig.set("RealEstate.Default.PricePerBlock.Sell", this.cfgPriceSellPerBlock);
|
outConfig.set("RealEstate.Default.PricePerBlock.Sell", this.cfgPriceSellPerBlock);
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import org.bukkit.OfflinePlayer;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
|
||||||
import co.aikar.commands.BaseCommand;
|
import co.aikar.commands.BaseCommand;
|
||||||
import co.aikar.commands.CommandHelp;
|
import co.aikar.commands.CommandHelp;
|
||||||
import co.aikar.commands.annotation.CommandAlias;
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
@ -141,15 +143,23 @@ public class RECommand extends BaseCommand
|
|||||||
"The proposition has been successfully created!");
|
"The proposition has been successfully created!");
|
||||||
UUID other = player.getUniqueId().equals(bt.owner) ? bt.buyer : bt.owner;
|
UUID other = player.getUniqueId().equals(bt.owner) ? bt.buyer : bt.owner;
|
||||||
OfflinePlayer otherP = Bukkit.getOfflinePlayer(other);
|
OfflinePlayer otherP = Bukkit.getOfflinePlayer(other);
|
||||||
|
Location loc = player.getLocation();
|
||||||
|
String claimType = GriefPrevention.instance.dataStore.getClaimAt(loc, false, null).parent == null ? "claim" : "subclaim";
|
||||||
if(otherP.isOnline())
|
if(otherP.isOnline())
|
||||||
{
|
{
|
||||||
Location loc = player.getLocation();
|
|
||||||
String claimType = GriefPrevention.instance.dataStore.getClaimAt(loc, false, null).parent == null ? "claim" : "subclaim";
|
|
||||||
((Player)otherP).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
((Player)otherP).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
||||||
ChatColor.AQUA + " has created an offer to exit the rent/lease contract for the " + claimType + " at " +
|
ChatColor.AQUA + " has created an offer to exit the rent/lease contract for the " + claimType + " at " +
|
||||||
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
||||||
+ loc.getBlockZ() + "]" + ChatColor.AQUA + " for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
+ loc.getBlockZ() + "]" + ChatColor.AQUA + " for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(other);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
||||||
|
ChatColor.AQUA + " has created an offer to exit the rent/lease contract for the " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
||||||
|
+ loc.getBlockZ() + "]" + ChatColor.AQUA + " for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subcommand("accept")
|
@Subcommand("accept")
|
||||||
@ -183,6 +193,14 @@ public class RECommand extends BaseCommand
|
|||||||
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
||||||
", Z: " + loc.getBlockZ() + "]. It is no longer rented or leased.");
|
", Z: " + loc.getBlockZ() + "]. It is no longer rented or leased.");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(other);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
||||||
|
ChatColor.AQUA + " has accepted your offer to exit the rent/lease contract for the " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
||||||
|
", Z: " + loc.getBlockZ() + "]. It is no longer rented or leased.");
|
||||||
|
}
|
||||||
bt.exitOffer = null;
|
bt.exitOffer = null;
|
||||||
claim.dropPermission(bt.buyer.toString());
|
claim.dropPermission(bt.buyer.toString());
|
||||||
bt.buyer = null;
|
bt.buyer = null;
|
||||||
@ -223,6 +241,14 @@ public class RECommand extends BaseCommand
|
|||||||
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
||||||
", Z: " + loc.getBlockZ() + "]");
|
", Z: " + loc.getBlockZ() + "]");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(other);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
||||||
|
ChatColor.AQUA + " has refused your offer to exit the rent/lease contract for the " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() +
|
||||||
|
", Z: " + loc.getBlockZ() + "]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,6 +274,14 @@ public class RECommand extends BaseCommand
|
|||||||
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
||||||
+ loc.getBlockZ() + "]");
|
+ loc.getBlockZ() + "]");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(other);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() +
|
||||||
|
ChatColor.AQUA + " has cancelled his offer to exit the rent/lease contract for the " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + loc.getWorld().getName() + ", X: " + loc.getBlockX() + ", Y: " + loc.getBlockY() + ", Z: "
|
||||||
|
+ loc.getBlockZ() + "]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import org.bukkit.configuration.serialization.ConfigurationSerialization;
|
|||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.Essentials;
|
||||||
|
|
||||||
import co.aikar.commands.BukkitCommandManager;
|
import co.aikar.commands.BukkitCommandManager;
|
||||||
import co.aikar.commands.ConditionFailedException;
|
import co.aikar.commands.ConditionFailedException;
|
||||||
import me.EtienneDx.RealEstate.Transactions.BoughtTransaction;
|
import me.EtienneDx.RealEstate.Transactions.BoughtTransaction;
|
||||||
@ -33,6 +35,7 @@ public class RealEstate extends JavaPlugin
|
|||||||
public static boolean vaultPresent = false;
|
public static boolean vaultPresent = false;
|
||||||
public static Economy econ = null;
|
public static Economy econ = null;
|
||||||
public static Permission perms = null;
|
public static Permission perms = null;
|
||||||
|
public static Essentials ess = null;
|
||||||
|
|
||||||
public static RealEstate instance = null;
|
public static RealEstate instance = null;
|
||||||
|
|
||||||
@ -70,6 +73,10 @@ public class RealEstate extends JavaPlugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if((ess = (Essentials)getServer().getPluginManager().getPlugin("Essentials")) != null)
|
||||||
|
{
|
||||||
|
this.log.info("Found Essentials, using version " + ess.getDescription().getVersion());
|
||||||
|
}
|
||||||
this.config = new Config();
|
this.config = new Config();
|
||||||
this.config.loadConfig();// loads config or default
|
this.config.loadConfig();// loads config or default
|
||||||
this.config.saveConfig();// save eventual default
|
this.config.saveConfig();// save eventual default
|
||||||
|
|||||||
@ -4,14 +4,17 @@ import java.util.Map;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import me.EtienneDx.RealEstate.RealEstate;
|
||||||
import me.ryanhamshire.GriefPrevention.Claim;
|
import me.ryanhamshire.GriefPrevention.Claim;
|
||||||
|
|
||||||
public abstract class BoughtTransaction extends ClaimTransaction
|
public abstract class BoughtTransaction extends ClaimTransaction
|
||||||
{
|
{
|
||||||
public UUID buyer = null;
|
public UUID buyer = null;
|
||||||
public ExitOffer exitOffer = null;
|
public ExitOffer exitOffer = null;
|
||||||
|
public boolean destroyedSign = false;
|
||||||
|
|
||||||
public BoughtTransaction(Map<String, Object> map)
|
public BoughtTransaction(Map<String, Object> map)
|
||||||
{
|
{
|
||||||
@ -20,6 +23,8 @@ public abstract class BoughtTransaction extends ClaimTransaction
|
|||||||
buyer = UUID.fromString((String)map.get("buyer"));
|
buyer = UUID.fromString((String)map.get("buyer"));
|
||||||
if(map.get("exitOffer") != null)
|
if(map.get("exitOffer") != null)
|
||||||
exitOffer = (ExitOffer) map.get("exitOffer");
|
exitOffer = (ExitOffer) map.get("exitOffer");
|
||||||
|
if(map.get("destroyedSign") != null)// may be the case on upgrading from 0.0.1-SNAPSHOT
|
||||||
|
destroyedSign = (boolean) map.get("destroyedSign");
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoughtTransaction(Claim claim, Player player, double price, Location sign)
|
public BoughtTransaction(Claim claim, Player player, double price, Location sign)
|
||||||
@ -35,10 +40,22 @@ public abstract class BoughtTransaction extends ClaimTransaction
|
|||||||
map.put("buyer", buyer.toString());
|
map.put("buyer", buyer.toString());
|
||||||
if(exitOffer != null)
|
if(exitOffer != null)
|
||||||
map.put("exitOffer", exitOffer);
|
map.put("exitOffer", exitOffer);
|
||||||
|
map.put("destroyedSign", destroyedSign);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void destroySign()
|
||||||
|
{
|
||||||
|
if((this instanceof ClaimRent &&RealEstate.instance.config.cfgDestroyRentSigns) ||
|
||||||
|
(this instanceof ClaimLease &&RealEstate.instance.config.cfgDestroyLeaseSigns))
|
||||||
|
{
|
||||||
|
if(!destroyedSign && getHolder().getState() instanceof Sign)
|
||||||
|
getHolder().breakNaturally();
|
||||||
|
destroyedSign = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UUID getBuyer()
|
public UUID getBuyer()
|
||||||
{
|
{
|
||||||
return buyer;
|
return buyer;
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import org.bukkit.OfflinePlayer;
|
|||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
|
||||||
import me.EtienneDx.RealEstate.RealEstate;
|
import me.EtienneDx.RealEstate.RealEstate;
|
||||||
import me.EtienneDx.RealEstate.Utils;
|
import me.EtienneDx.RealEstate.Utils;
|
||||||
import me.ryanhamshire.GriefPrevention.Claim;
|
import me.ryanhamshire.GriefPrevention.Claim;
|
||||||
@ -59,7 +61,11 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
{
|
{
|
||||||
if(buyer == null)// not yet leased
|
if(buyer == null)// not yet leased
|
||||||
{
|
{
|
||||||
if(sign.getBlock().getState() instanceof Sign)
|
if(destroyedSign)
|
||||||
|
{
|
||||||
|
RealEstate.transactionsStore.cancelTransaction(this);
|
||||||
|
}
|
||||||
|
else if(sign.getBlock().getState() instanceof Sign)
|
||||||
{
|
{
|
||||||
Sign s = (Sign)sign.getBlock().getState();
|
Sign s = (Sign)sign.getBlock().getState();
|
||||||
s.setLine(0, RealEstate.instance.config.cfgSignsHeader);
|
s.setLine(0, RealEstate.instance.config.cfgSignsHeader);
|
||||||
@ -69,10 +75,6 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
s.setLine(3, Utils.getTime(frequency, null, false));
|
s.setLine(3, Utils.getTime(frequency, null, false));
|
||||||
s.update(true);
|
s.update(true);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
RealEstate.transactionsStore.cancelTransaction(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -113,6 +115,15 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.buyer);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.AQUA +
|
||||||
|
"Paid lease for the " + claimType + " at " + ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() +
|
||||||
|
", Y: " + sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
|
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
|
}
|
||||||
|
|
||||||
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
||||||
{
|
{
|
||||||
@ -123,6 +134,16 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
ChatColor.AQUA + " at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
ChatColor.AQUA + " at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + buyerPlayer.getName() +
|
||||||
|
ChatColor.AQUA + " has paid lease for the " + claimType + " at " + ChatColor.BLUE + "[" +
|
||||||
|
sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + " at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
|
ChatColor.AQUA + ", " + ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -134,6 +155,15 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
ChatColor.AQUA + ", the " + claimType + " is now yours");
|
ChatColor.AQUA + ", the " + claimType + " is now yours");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.buyer);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.AQUA +
|
||||||
|
"Paid final lease for the " + claimType + " at " + ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() +
|
||||||
|
", Y: " + sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + " for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
|
ChatColor.AQUA + ", the " + claimType + " is now yours");
|
||||||
|
}
|
||||||
|
|
||||||
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
||||||
{
|
{
|
||||||
@ -144,6 +174,16 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
ChatColor.AQUA + ", the " + claimType + " is now his property");
|
ChatColor.AQUA + ", the " + claimType + " is now his property");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + buyerPlayer.getName() +
|
||||||
|
ChatColor.AQUA + " has paid lease for the " + claimType + " at " + ChatColor.BLUE + "[" +
|
||||||
|
sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() +
|
||||||
|
ChatColor.AQUA + ", the " + claimType + " is now his property");
|
||||||
|
}
|
||||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(sign, false, null);
|
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(sign, false, null);
|
||||||
|
|
||||||
Utils.transferClaim(claim, buyer, owner);
|
Utils.transferClaim(claim, buyer, owner);
|
||||||
@ -159,6 +199,14 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
sign.getBlockX() + ", Y: " +
|
sign.getBlockX() + ", Y: " +
|
||||||
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", the transaction has been cancelled.");
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", the transaction has been cancelled.");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.buyer);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.RED +
|
||||||
|
"Couldn't pay the lease for the " + claimType + " at " + ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " +
|
||||||
|
sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", the transaction has been cancelled.");
|
||||||
|
}
|
||||||
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
||||||
{
|
{
|
||||||
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + buyerPlayer.getName() +
|
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + buyerPlayer.getName() +
|
||||||
@ -167,6 +215,15 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
ChatColor.AQUA + ", the transaction has been cancelled");
|
ChatColor.AQUA + ", the transaction has been cancelled");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + buyerPlayer.getName() +
|
||||||
|
ChatColor.AQUA + " couldn't pay lease for the " + claimType + " at " + ChatColor.BLUE + "[" +
|
||||||
|
sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + ", the transaction has been cancelled");
|
||||||
|
}
|
||||||
RealEstate.transactionsStore.cancelTransaction(this);
|
RealEstate.transactionsStore.cancelTransaction(this);
|
||||||
}
|
}
|
||||||
// no need to re update, since there's no sign
|
// no need to re update, since there's no sign
|
||||||
@ -258,17 +315,27 @@ public class ClaimLease extends BoughtTransaction
|
|||||||
{
|
{
|
||||||
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
||||||
" has just paid for your lease for the " + claimType + " at " +
|
" has just paid for your lease for the " + claimType + " at " +
|
||||||
"[" + sign.getWorld().getName() + ", " +
|
ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " + sign.getBlockY() + ", Z: "
|
||||||
"X: " + sign.getBlockX() + ", " +
|
+ sign.getBlockZ() + "]" + ChatColor.AQUA +
|
||||||
"Y: " + sign.getBlockY() + ", " +
|
|
||||||
"Z: " + sign.getBlockZ() + "] " +
|
|
||||||
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
||||||
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
||||||
|
" has just paid for your lease for the " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " + sign.getBlockY() + ", Z: "
|
||||||
|
+ sign.getBlockZ() + "]" + ChatColor.AQUA +
|
||||||
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
||||||
|
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully paid lease for this " + claimType +
|
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully paid lease for this " + claimType +
|
||||||
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural() + ChatColor.AQUA + ", " +
|
||||||
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
ChatColor.GREEN + paymentsLeft + ChatColor.AQUA + " payments left");
|
||||||
|
|
||||||
|
destroySign();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import org.bukkit.OfflinePlayer;
|
|||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
|
||||||
import me.EtienneDx.RealEstate.RealEstate;
|
import me.EtienneDx.RealEstate.RealEstate;
|
||||||
import me.EtienneDx.RealEstate.Utils;
|
import me.EtienneDx.RealEstate.Utils;
|
||||||
import me.ryanhamshire.GriefPrevention.Claim;
|
import me.ryanhamshire.GriefPrevention.Claim;
|
||||||
@ -65,7 +67,11 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
{
|
{
|
||||||
if(buyer == null)
|
if(buyer == null)
|
||||||
{
|
{
|
||||||
if(sign.getBlock().getState() instanceof Sign)
|
if(destroyedSign)
|
||||||
|
{
|
||||||
|
RealEstate.transactionsStore.cancelTransaction(this);
|
||||||
|
}
|
||||||
|
else if(sign.getBlock().getState() instanceof Sign)
|
||||||
{
|
{
|
||||||
Sign s = (Sign) sign.getBlock().getState();
|
Sign s = (Sign) sign.getBlock().getState();
|
||||||
s.setLine(0, RealEstate.instance.config.cfgSignsHeader);
|
s.setLine(0, RealEstate.instance.config.cfgSignsHeader);
|
||||||
@ -75,10 +81,6 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
s.setLine(3, (maxPeriod > 1 ? maxPeriod + "x " : "") + Utils.getTime(duration, null, false));
|
s.setLine(3, (maxPeriod > 1 ? maxPeriod + "x " : "") + Utils.getTime(duration, null, false));
|
||||||
s.update(true);
|
s.update(true);
|
||||||
}
|
}
|
||||||
else// if no one is renting it, we can delete it (no sign indicating it's rentable)
|
|
||||||
{
|
|
||||||
RealEstate.transactionsStore.cancelTransaction(this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -147,6 +149,14 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
", Y: " + sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
", Y: " + sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
ChatColor.AQUA + "for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
ChatColor.AQUA + "for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.buyer);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.AQUA +
|
||||||
|
"Paid rent for the " + claimType + " at " + ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() +
|
||||||
|
", Y: " + sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + "for the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
|
}
|
||||||
|
|
||||||
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
if(seller.isOnline() && RealEstate.instance.config.cfgMessageOwner)
|
||||||
{
|
{
|
||||||
@ -156,6 +166,17 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + buyerPlayer.getName() +
|
||||||
|
" has paid rent for the " + claimType + " at " + ChatColor.BLUE + "[" +
|
||||||
|
sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" +
|
||||||
|
ChatColor.AQUA + "at the price of " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (autoRenew)
|
else if (autoRenew)
|
||||||
{
|
{
|
||||||
@ -166,6 +187,14 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
sign.getBlockX() + ", Y: " +
|
sign.getBlockX() + ", Y: " +
|
||||||
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", your access has been revoked.");
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", your access has been revoked.");
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.buyer);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.RED +
|
||||||
|
"Couldn't pay the rent for the " + claimType + " at " + ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " +
|
||||||
|
sign.getBlockX() + ", Y: " +
|
||||||
|
sign.getBlockY() + ", Z: " + sign.getBlockZ() + "]" + ChatColor.RED + ", your access has been revoked.");
|
||||||
|
}
|
||||||
unRent(false);
|
unRent(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -262,15 +291,24 @@ public class ClaimRent extends BoughtTransaction
|
|||||||
{
|
{
|
||||||
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
((Player)seller).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
||||||
" has just rented your " + claimType + " at " +
|
" has just rented your " + claimType + " at " +
|
||||||
"[" + sign.getWorld().getName() + ", " +
|
ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " + sign.getBlockY() + ", Z: "
|
||||||
"X: " + sign.getBlockX() + ", " +
|
+ sign.getBlockZ() + "]" + ChatColor.AQUA +
|
||||||
"Y: " + sign.getBlockY() + ", " +
|
|
||||||
"Z: " + sign.getBlockZ() + "] " +
|
|
||||||
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(this.owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.GREEN + player.getName() + ChatColor.AQUA +
|
||||||
|
" has just rented your " + claimType + " at " +
|
||||||
|
ChatColor.BLUE + "[" + sign.getWorld().getName() + ", X: " + sign.getBlockX() + ", Y: " + sign.getBlockY() + ", Z: "
|
||||||
|
+ sign.getBlockZ() + "]" + ChatColor.AQUA +
|
||||||
|
" for " + ChatColor.GREEN + price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully rented this " + claimType +
|
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "You have successfully rented this " + claimType +
|
||||||
" for " + ChatColor.GREEN + price + RealEstate.econ.currencyNamePlural());
|
" for " + ChatColor.GREEN + price + RealEstate.econ.currencyNamePlural());
|
||||||
|
|
||||||
|
destroySign();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package me.EtienneDx.RealEstate.Transactions;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
|
|
||||||
import me.EtienneDx.RealEstate.RealEstate;
|
import me.EtienneDx.RealEstate.RealEstate;
|
||||||
import me.EtienneDx.RealEstate.Utils;
|
import me.EtienneDx.RealEstate.Utils;
|
||||||
import me.ryanhamshire.GriefPrevention.Claim;
|
import me.ryanhamshire.GriefPrevention.Claim;
|
||||||
@ -110,13 +112,24 @@ public class ClaimSell extends ClaimTransaction
|
|||||||
if(oldOwner.isOnline())
|
if(oldOwner.isOnline())
|
||||||
{
|
{
|
||||||
((Player) oldOwner).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + player.getDisplayName() +
|
((Player) oldOwner).sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + player.getDisplayName() +
|
||||||
" has purchased your " + claimType + " at " +
|
" has purchased your " + claimType + " at " + ChatColor.BLUE +
|
||||||
"[" + player.getLocation().getWorld().getName() + ", " +
|
"[" + player.getLocation().getWorld().getName() + ", " +
|
||||||
"X: " + player.getLocation().getBlockX() + ", " +
|
"X: " + player.getLocation().getBlockX() + ", " +
|
||||||
"Y: " + player.getLocation().getBlockY() + ", " +
|
"Y: " + player.getLocation().getBlockY() + ", " +
|
||||||
"Z: " + player.getLocation().getBlockZ() + "] for " +
|
"Z: " + player.getLocation().getBlockZ() + "] " + ChatColor.AQUA + "for " + ChatColor.GREEN +
|
||||||
price + " " + RealEstate.econ.currencyNamePlural());
|
price + " " + RealEstate.econ.currencyNamePlural());
|
||||||
}
|
}
|
||||||
|
else if(RealEstate.instance.config.cfgMailOffline && RealEstate.ess != null)
|
||||||
|
{
|
||||||
|
User u = RealEstate.ess.getUser(owner);
|
||||||
|
u.addMail(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + player.getDisplayName() +
|
||||||
|
" has purchased your " + claimType + " at " + ChatColor.BLUE +
|
||||||
|
"[" + player.getLocation().getWorld().getName() + ", " +
|
||||||
|
"X: " + player.getLocation().getBlockX() + ", " +
|
||||||
|
"Y: " + player.getLocation().getBlockY() + ", " +
|
||||||
|
"Z: " + player.getLocation().getBlockZ() + "] " + ChatColor.AQUA + "for " + ChatColor.GREEN +
|
||||||
|
price + " " + RealEstate.econ.currencyNamePlural());;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user