1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2024-10-31 22:38:48 +00:00

feat: 圈地世界限制忽略OP和管理

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-13 18:10:19 +08:00
parent 32bc49cec7
commit 9430afd9a2
3 changed files with 5 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pw.yumc</groupId>
<artifactId>Residence</artifactId>
<version>2.8.3.3</version>
<version>2.8.3.4</version>
<name>Residence</name>
<description>重制版本的领地插件 - 喵♂呜</description>
<build>
@ -60,6 +60,7 @@
<properties>
<update.description>&amp;6GUI菜单上线(&amp;c测试版本&amp;6)...</update.description>
<update.changes>
&amp;b2.8.3.4 - &amp;c圈地世界限制忽略OP和管理...;
&amp;b2.8.3.3 - &amp;c添加圈地世界限制(详见dany.yml)...;
&amp;b2.8.3.2 - &amp;c去除铁轨修复补丁(1.8开始无需修复)...;
&amp;b2.8.3.1 - &amp;4修复菜单监听未启用的问题(请删除一次gui.yml)...;

View File

@ -29,11 +29,11 @@ public class CommandCreate extends BaseCommand {
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
final Player player = (Player) sender;
if (plugin.getDeny().getStringList("world").contains(player.getWorld().getName())) {
final boolean resadmin = (command != null);
if (plugin.getDeny().getStringList("world").contains(player.getWorld().getName()) && !resadmin && !player.isOp()) {
player.sendMessage("§c当前世界不允许圈地!");
return;
}
final boolean resadmin = (command != null);
final ResidenceManager rmanager = plugin.getResidenceManager();
final Language language = plugin.getLanguage();
final SelectionManager smanager = plugin.getSelectionManager();

View File

@ -283,7 +283,7 @@ public class ResidencePlayerListener implements Listener {
}
if (event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (player.getItemInHand().getTypeId() == plugin.getConfigManager().getSelectionTooldID()) {
if (plugin.getDeny().getStringList("world").contains(player.getWorld().getName())) {
if (plugin.getDeny().getStringList("world").contains(player.getWorld().getName()) && !resadmin && !player.isOp()) {
player.sendMessage("§c当前世界不允许圈地!");
return;
}