mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-02 23:13:21 +01:00
d6bdb0486a
- Formatting - Warning about old Bukkit version - Renamed "TOWNY_CANNOT_CREATE_SHOP_HERE" to "CANNOT_CREATE_SHOP_HERE" to avoid confusion - Renamed "NOT_ENOUGH_LWC_PROTECTIONS" to "NOT_ENOUGH_PROTECTIONS" and changed its message - Fixed armour enchantments - Logging shop location - Fixed Heroes for the newest version - Removed redutant plugin object - Added dev-url for CraftBukkitUpToDate - Removed redutant plugins from softdepend - Fixed a bug when the player interacts with a shop with a sign in hand
25 lines
714 B
Java
25 lines
714 B
Java
package com.Acrobot.ChestShop.Protection.Plugins;
|
|
|
|
import com.Acrobot.ChestShop.Protection.Protection;
|
|
import com.daemitus.deadbolt.Deadbolt;
|
|
import org.bukkit.block.Block;
|
|
import org.bukkit.entity.Player;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class DeadboltPlugin implements Protection {
|
|
public boolean isProtected(Block block) {
|
|
return Deadbolt.isProtected(block);
|
|
}
|
|
|
|
public boolean canAccess(Player player, Block block) {
|
|
int length = (player.getName().length() > 15 ? 15 : player.getName().length());
|
|
return Deadbolt.getAllNames(block).contains(player.getName().substring(0, length));
|
|
}
|
|
|
|
public boolean protect(String name, Block block) {
|
|
return false;
|
|
}
|
|
}
|