mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 18:45:31 +01:00
Update residence comptibility
This commit is contained in:
parent
fa7a196bab
commit
fc3c134c2a
7
pom.xml
7
pom.xml
@ -237,11 +237,10 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.t00thpick1</groupId>
|
||||
<artifactId>residence</artifactId>
|
||||
<version>3.0.0q-SNAPSHOT</version>
|
||||
<groupId>com.bekvon.bukkit.residence</groupId>
|
||||
<artifactId>Residence</artifactId>
|
||||
<version>4.5.3.0</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.Acrobot.ChestShop.Plugins;
|
||||
|
||||
import com.Acrobot.ChestShop.Events.Protection.ProtectionCheckEvent;
|
||||
import net.t00thpick1.residence.Residence;
|
||||
import net.t00thpick1.residence.api.ResidenceAPI;
|
||||
import net.t00thpick1.residence.api.areas.ResidenceArea;
|
||||
import net.t00thpick1.residence.api.flags.FlagManager;
|
||||
import com.bekvon.bukkit.residence.Residence;
|
||||
import com.bekvon.bukkit.residence.api.ResidenceApi;
|
||||
import com.bekvon.bukkit.residence.containers.Flags;
|
||||
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
@ -25,10 +25,10 @@ public class ResidenceChestProtection implements Listener {
|
||||
|
||||
Block block = event.getBlock();
|
||||
Player player = event.getPlayer();
|
||||
ResidenceArea area = ResidenceAPI.getResidenceManager().getByLocation(block.getLocation());
|
||||
ClaimedResidence residence = ResidenceApi.getResidenceManager().getByLoc(block.getLocation());
|
||||
|
||||
if (area != null) {
|
||||
if (!area.allowAction(player.getName(), FlagManager.CONTAINER) && !Residence.getInstance().isAdminMode(player)) {
|
||||
if (residence != null) {
|
||||
if (!residence.getPermissions().playerHas(player, Flags.container, true) && !Residence.isResAdminOn(player)) {
|
||||
//Doesn't have permissions to that chest.
|
||||
event.setResult(Event.Result.DENY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user