cleanup of old comments
This commit is contained in:
parent
80131ea2d9
commit
2fd872d707
@ -112,104 +112,10 @@ public class Config extends AnnotationConfig
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*public void loadConfig(YamlConfiguration config)
|
||||
{
|
||||
this.cfgSignsHeader = config.getString("RealEstate.Keywords.SignsHeader", ChatColor.GOLD + "[RealEstate]");
|
||||
//this.cfgSigns = getConfigList(config, "RealEstate.Keywords.Signs", Arrays.asList("[re]", "[realestate]"));
|
||||
|
||||
this.cfgSellKeywords = getConfigList(config, "RealEstate.Keywords.Sell", Arrays.asList("[sell]", "[sell claim]", "[sc]", "[re]", "[realestate]"));
|
||||
this.cfgRentKeywords = getConfigList(config, "RealEstate.Keywords.Rent", Arrays.asList("[rent]", "[rent claim]", "[rc]"));
|
||||
this.cfgLeaseKeywords = getConfigList(config, "RealEstate.Keywords.Lease", Arrays.asList("[lease]", "[lease claim]", "[lc]"));
|
||||
|
||||
this.cfgReplaceSell = config.getString("RealEstate.Keywords.Replace.Sell", "FOR SALE");
|
||||
this.cfgReplaceRent = config.getString("RealEstate.Keywords.Replace.Rent", "FOR RENT");
|
||||
this.cfgReplaceLease = config.getString("RealEstate.Keywords.Replace.Lease", "FOR LEASE");
|
||||
|
||||
this.cfgEnableSell = config.getBoolean("RealEstate.Rules.Sell", true);
|
||||
this.cfgEnableRent = config.getBoolean("RealEstate.Rules.Rent", true);
|
||||
this.cfgEnableLease = config.getBoolean("RealEstate.Rules.Lease", true);
|
||||
|
||||
this.cfgEnableAutoRenew = config.getBoolean("RealEstate.Rules.AutomaticRenew", 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.cfgUseCurrencySymbol = config.getBoolean("RealEstate.Rules.UseCurrencySymbol", false);
|
||||
this.cfgCurrencySymbol = config.getString("RealEstate.Rules.CurrencySymbol", "$");
|
||||
|
||||
this.cfgMessageOwner = config.getBoolean("RealEstate.Messaging.MessageOwner", 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.cfgPriceSellPerBlock = config.getDouble("RealEstate.Default.PricesPerBlock.Sell", 5.0);
|
||||
this.cfgPriceRentPerBlock = config.getDouble("RealEstate.Default.PricesPerBlock.Rent", 2.0);
|
||||
this.cfgPriceLeasePerBlock = config.getDouble("RealEstate.Default.PricesPerBlock.Lease", 2.0);
|
||||
|
||||
this.cfgRentTime = config.getString("RealEstate.Default.Duration.Rent", "7D");
|
||||
this.cfgLeaseTime = config.getString("RealEstate.Default.Duration.Lease", "7D");
|
||||
|
||||
this.cfgLeasePayments = config.getInt("RealEstate.Default.PaymentsCount.Lease", 5);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void loadConfig()
|
||||
{
|
||||
//YamlConfiguration config = YamlConfiguration.loadConfiguration(new File(this.configFilePath));
|
||||
this.loadConfig(this.configFilePath);
|
||||
}
|
||||
|
||||
/*public void saveConfig()
|
||||
{
|
||||
FileConfiguration outConfig = new YamlConfiguration();
|
||||
outConfig.set("RealEstate.Keywords.SignsHeader", this.cfgSignsHeader);
|
||||
//outConfig.set("RealEstate.Keywords.Signs", this.cfgSigns);
|
||||
|
||||
outConfig.set("RealEstate.Keywords.Sell", this.cfgSellKeywords);
|
||||
outConfig.set("RealEstate.Keywords.Rent", this.cfgRentKeywords);
|
||||
outConfig.set("RealEstate.Keywords.Lease", this.cfgLeaseKeywords);
|
||||
|
||||
outConfig.set("RealEstate.Keywords.Replace.Sell", this.cfgReplaceSell);
|
||||
outConfig.set("RealEstate.Keywords.Replace.Rent", this.cfgReplaceRent);
|
||||
outConfig.set("RealEstate.Keywords.Replace.Lease", this.cfgReplaceLease);
|
||||
|
||||
outConfig.set("RealEstate.Rules.Sell", this.cfgEnableSell);
|
||||
outConfig.set("RealEstate.Rules.Rent", this.cfgEnableRent);
|
||||
outConfig.set("RealEstate.Rules.Lease", this.cfgEnableLease);
|
||||
|
||||
outConfig.set("RealEstate.Rules.AutomaticRenew", this.cfgEnableAutoRenew);
|
||||
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.UseCurrencySymbol", this.cfgUseCurrencySymbol);
|
||||
outConfig.set("RealEstate.Rules.CurrencySymbol", this.cfgCurrencySymbol);
|
||||
|
||||
outConfig.set("RealEstate.Messaging.MessageOwner", this.cfgMessageOwner);
|
||||
outConfig.set("RealEstate.Messaging.MessageBuyer", this.cfgMessageBuyer);
|
||||
outConfig.set("RealEstate.Messaging.MailOffline", this.cfgMailOffline);
|
||||
outConfig.set("RealEstate.Messaging.BroadcastSell", this.cfgBroadcastSell);
|
||||
|
||||
outConfig.set("RealEstate.Default.PricePerBlock.Sell", this.cfgPriceSellPerBlock);
|
||||
outConfig.set("RealEstate.Default.PricePerBlock.Rent", this.cfgPriceRentPerBlock);
|
||||
outConfig.set("RealEstate.Default.PricePerBlock.Lease", this.cfgPriceLeasePerBlock);
|
||||
|
||||
outConfig.set("RealEstate.Default.Duration.Rent", this.cfgRentTime);
|
||||
outConfig.set("RealEstate.Default.Duration.Lease", this.cfgLeaseTime);
|
||||
|
||||
outConfig.set("RealEstate.Default.PaymentsCount.Lease", this.cfgLeasePayments);
|
||||
|
||||
try
|
||||
{
|
||||
outConfig.save(this.configFilePath);
|
||||
}
|
||||
catch (IOException exception)
|
||||
{
|
||||
RealEstate.instance.log.info("Unable to write to the configuration file at \"" + this.configFilePath + "\"");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@ -181,57 +181,6 @@ public class RECommand extends BaseCommand
|
||||
}
|
||||
}
|
||||
|
||||
/*@Subcommand("seller")
|
||||
@Description("Displays or changes the seller of a claim (admin only)")
|
||||
@Conditions("inPendingTransactionClaim")
|
||||
public static void setSeller(Player player, @Optional String newSeller)
|
||||
{
|
||||
Location loc = player.getLocation();
|
||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(loc, false, null);
|
||||
Transaction tr = RealEstate.transactionsStore.getTransaction(claim);
|
||||
if(!claim.isAdminClaim())
|
||||
{
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.RED + "This is not an admin claim");
|
||||
}
|
||||
else if(newSeller == null)
|
||||
{
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "The seller of this claim is " +
|
||||
ChatColor.GREEN + (tr.getOwner() == null ? "the server" : Bukkit.getPlayer(tr.getOwner()).getDisplayName()));
|
||||
}
|
||||
else if(!RealEstate.perms.has(player, "realestate.admin"))
|
||||
{
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.RED + "You don't have the permission to change the seller");
|
||||
}
|
||||
else if(newSeller.equalsIgnoreCase("server"))
|
||||
{
|
||||
tr.setOwner(null);
|
||||
tr.update();
|
||||
RealEstate.transactionsStore.saveData();
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "Changed the seller to the server");
|
||||
}
|
||||
else
|
||||
{
|
||||
Player newOwner = Bukkit.getPlayer(newSeller);
|
||||
if(newOwner == null)
|
||||
{
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.RED + "Couldn't find this player (he may be offline)");
|
||||
}
|
||||
else if(!RealEstate.perms.has(newOwner, "realestate.admin"))
|
||||
{
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.RED +
|
||||
"This player doesn't have the right to lease/rent/sell admin claims");
|
||||
}
|
||||
else
|
||||
{
|
||||
tr.setOwner(newOwner.getUniqueId());
|
||||
tr.update();
|
||||
RealEstate.transactionsStore.saveData();
|
||||
player.sendMessage(RealEstate.instance.config.chatPrefix + ChatColor.AQUA + "Changed the seller to " +
|
||||
ChatColor.GREEN + newOwner.getDisplayName());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@Subcommand("exitoffer")
|
||||
@Conditions("partOfBoughtTransaction")
|
||||
public class ExitOfferCommand extends BaseCommand
|
||||
|
||||
Loading…
Reference in New Issue
Block a user