ChestShop-3/com/Acrobot/ChestShop/Protection/Plugins/LockettePlugin.java
Acrobot a84c68d49d - Changed how configuration works, so it works with plugin folder in different place
- Added support for Deadbolt
- By default, left clicking your own sign doesn't do anything
- Restricted signs now check if you've got permission ChestShop.group.groupName
- Added support for stacking unstackable things
- Updated Register
- Changed how plugins are loaded.
2011-09-06 19:01:57 +02:00

27 lines
762 B
Java

package com.Acrobot.ChestShop.Protection.Plugins;
import com.Acrobot.ChestShop.Protection.Protection;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.yi.acru.bukkit.Lockette.Lockette;
/**
* @author Acrobot
*/
public class LockettePlugin implements Protection {
public static Lockette lockette;
public boolean isProtected(Block block) {
return Lockette.isProtected(block);
}
public boolean canAccess(Player player, Block block) {
int length = (player.getName().length() > 15 ? 15 : player.getName().length());
return player.getName().substring(0, length).equals(Lockette.getProtectedOwner(block));
}
public boolean protect(String name, Block block) {
return false;
}
}