-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Development
- Loading branch information
Showing
6 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/com/volmit/adapt/content/protector/LocketteProProtector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.volmit.adapt.content.protector; | ||
|
||
import com.volmit.adapt.Adapt; | ||
import com.volmit.adapt.AdaptConfig; | ||
import com.volmit.adapt.api.adaptation.Adaptation; | ||
import com.volmit.adapt.api.protection.Protector; | ||
import me.angeschossen.chestprotect.api.addons.ChestProtectAddon; | ||
import me.angeschossen.chestprotect.api.protection.block.BlockProtection; | ||
import me.crafter.mc.lockettepro.LocketteProAPI; | ||
import org.bukkit.Location; | ||
import org.bukkit.entity.Player; | ||
|
||
public class LocketteProProtector implements Protector { | ||
@Override | ||
public boolean canAccessChest(Player player, Location chestlocation, Adaptation<?> adaptation) { | ||
return LocketteProAPI.isOwner(chestlocation.getBlock(), player); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "LockettePro"; | ||
} | ||
|
||
@Override | ||
public boolean isEnabledByDefault() { | ||
return AdaptConfig.get().getProtectorSupport().isLockettePro(); | ||
} | ||
} |