Adapted code to fit the latest Grief Prevention build
This commit is contained in:
parent
16a581f397
commit
eb35e8fde7
2
pom.xml
2
pom.xml
@ -111,7 +111,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.EtienneDx</groupId>
|
||||
<artifactId>GriefPrevention</artifactId>
|
||||
<version>master-SNAPSHOT</version>
|
||||
<version>f895138697e0d3ed35c0dff77c533155a1154e37</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@ -6,9 +6,9 @@ import org.bukkit.entity.Player;
|
||||
import me.EtienneDx.RealEstate.Transactions.BoughtTransaction;
|
||||
import me.EtienneDx.RealEstate.Transactions.Transaction;
|
||||
import me.ryanhamshire.GriefPrevention.Claim;
|
||||
import me.ryanhamshire.GriefPrevention.IRealEstate;
|
||||
import me.ryanhamshire.GriefPrevention.IAddonPlugin;
|
||||
|
||||
public class GP_RealEstateHook implements IRealEstate
|
||||
public class GP_RealEstateHook implements IAddonPlugin
|
||||
{
|
||||
@Override
|
||||
public String allowEdit(Claim claim, Player player)
|
||||
@ -71,8 +71,23 @@ public class GP_RealEstateHook implements IRealEstate
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean anyTransaction(Claim claim)
|
||||
public String mayResizeClaim(Claim claim, Player player, int newx1, int newx2, int newy1, int newy2, int newz1,
|
||||
int newz2)
|
||||
{
|
||||
return RealEstate.transactionsStore.anyTransaction(claim);
|
||||
if(RealEstate.transactionsStore.anyTransaction(claim))
|
||||
{
|
||||
return "This claim is currently involved in a transaction, you can't resize it!";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String mayAbandonClaim(Claim claim, Player player)
|
||||
{
|
||||
if(RealEstate.transactionsStore.anyTransaction(claim))
|
||||
{
|
||||
return "This claim is currently involved in a transaction, you can't abandon it!";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public class RealEstate extends JavaPlugin
|
||||
registerConditions();
|
||||
manager.registerCommand(new RECommand());
|
||||
|
||||
GriefPrevention.realEstate = new GP_RealEstateHook();
|
||||
GriefPrevention.addonPlugins.add(new GP_RealEstateHook());
|
||||
}
|
||||
|
||||
private void registerConditions()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user