From 81e56c1459a4d1b85f3d3dce86fe3f0eb988a386 Mon Sep 17 00:00:00 2001 From: CarmJos Date: Sat, 19 Feb 2022 03:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=88=9D=E5=A7=8B=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=8C=E4=BA=A4=E4=BB=98=E4=BD=BF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cc/carm/plugin/regionprotection/Main.java | 7 ------- .../plugin/regionprotection/listener/SelectListener.java | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/cc/carm/plugin/regionprotection/Main.java b/src/main/java/cc/carm/plugin/regionprotection/Main.java index fc54281..bfc3f3e 100644 --- a/src/main/java/cc/carm/plugin/regionprotection/Main.java +++ b/src/main/java/cc/carm/plugin/regionprotection/Main.java @@ -74,13 +74,6 @@ public boolean initialize() { log("注册指令..."); registerCommand("RegionProtection", new RegionProtectCommands()); - //测试 - RegionProtection.getRegionManager().setRegion("test", new ProtectedRegion( - "world", - new DataBlockLocation(-16, 50, -16), - new DataBlockLocation(16, 60, 16) - )); - return true; } diff --git a/src/main/java/cc/carm/plugin/regionprotection/listener/SelectListener.java b/src/main/java/cc/carm/plugin/regionprotection/listener/SelectListener.java index 0270eae..a8b6281 100644 --- a/src/main/java/cc/carm/plugin/regionprotection/listener/SelectListener.java +++ b/src/main/java/cc/carm/plugin/regionprotection/listener/SelectListener.java @@ -32,6 +32,8 @@ public void onClicking(PlayerInteractEvent event) { PlayerManager manager = RegionProtection.getPlayerManager(); if (!manager.isSelecting(player)) return; + event.setCancelled(true); + SelectingRegion region = manager.getSelectingRegion(player); if (!block.getWorld().getName().equals(region.getWorld())) { if ((isPos1 && region.getPos2() == null) || (!isPos1 && region.getPos1() == null)) {