Skip to content

Commit

Permalink
新增op可绕过经济检查
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdeZhang committed Jul 20, 2024
1 parent 00193c5 commit 9a11f4b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cn.lunadeer</groupId>
<artifactId>Dominion</artifactId>
<version>1.38.5-beta</version>
<version>1.38.6-beta</version>
<packaging>jar</packaging>

<name>Dominion</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cn/lunadeer/dominion/commands/Apis.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Map<Integer, Location> autoPoints(Player player) {
Location location2 = new Location(location.getWorld(), location.getX() + size, location.getY() + size, location.getZ() + size);
if (Dominion.config.getLimitVert()) {
location1.setY(Dominion.config.getLimitMinY());
location2.setY(Dominion.config.getLimitMaxY());
location2.setY(Dominion.config.getLimitMaxY() - 1);
}
Map<Integer, Location> points = new HashMap<>();
points.put(0, location1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,10 @@ private static boolean handleEconomyFailed(AbstractOperator operator, Integer co
operator.setResponse(FAIL.addMessage("没有可用的经济插件系统,请联系服主。"));
return true;
}
if (operator.isOp() && Dominion.config.getLimitOpBypass()) {
SUCCESS.addMessage("你是OP,已跳过经济检查。");
return false;
}
float priceOrRefund = count * Dominion.config.getEconomyPrice();
if (paid) {
if (VaultConnect.instance.getBalance(operator.getPlayer()) < priceOrRefund) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void selectPoint(PlayerInteractEvent event) {
Notification.info(player, "已选择第二个点: %d %d %d", block.getX(), block.getY(), block.getZ());
Location loc = block.getLocation();
if (Dominion.config.getLimitVert()) {
loc.setY(Dominion.config.getLimitMaxY());
loc.setY(Dominion.config.getLimitMaxY() - 1);
}
points.put(1, loc);
} else {
Expand Down

0 comments on commit 9a11f4b

Please sign in to comment.