Skip to content

Commit

Permalink
完成初始版本,交付使用。
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Feb 18, 2022
1 parent 1546f35 commit 81e56c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/java/cc/carm/plugin/regionprotection/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 81e56c1

Please sign in to comment.