fixed #22, smaller default page size

This commit is contained in:
EtienneDx 2020-05-15 18:22:44 +02:00
parent bb92624332
commit 1e3f8f76b4
2 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,7 @@ public class Config extends AnnotationConfig
public int cfgLeasePayments = 5; public int cfgLeasePayments = 5;
@ConfigField(name="RealEstate.Settings.PageSize", comment = "How many Real Estate offer should be shown by page using the '/re list' command") @ConfigField(name="RealEstate.Settings.PageSize", comment = "How many Real Estate offer should be shown by page using the '/re list' command")
public int cfgPageSize = 20; public int cfgPageSize = 8;
public Config() public Config()
{ {

View File

@ -214,7 +214,8 @@ public class RealEstate extends JavaPlugin
throw new ConditionFailedException("This command only applies to rented claims!"); throw new ConditionFailedException("This command only applies to rented claims!");
} }
if((((ClaimRent)tr).buyer != null && ((ClaimRent)tr).buyer.equals(context.getIssuer().getPlayer().getUniqueId())) || if((((ClaimRent)tr).buyer != null && ((ClaimRent)tr).buyer.equals(context.getIssuer().getPlayer().getUniqueId())) ||
tr.getOwner().equals(context.getIssuer().getPlayer().getUniqueId())) (tr.getOwner() != null && (tr.getOwner().equals(context.getIssuer().getPlayer().getUniqueId()))) ||
(c.isAdminClaim() && RealEstate.perms.has(context.getIssuer().getPlayer(), "realestate.admin")))
{ {
return; return;
} }