Skip to content

Commit

Permalink
Make trust use args[0] rather than args[1]
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyboy-roks committed Jul 19, 2024
1 parent 6c40044 commit b208e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/kicas/rp/command/CommandTrust.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command

List<Region> allRegions = RegionProtection.getDataManager().getPlayerRegions((Player) sender, ((Player) sender).getWorld());

if (locationClaim == null && specifiedClaim == null && !args[1].equalsIgnoreCase("all")) {
if (locationClaim == null && specifiedClaim == null && !args[0].equalsIgnoreCase("all")) {
sender.sendMessage(ChatColor.RED + "Please " +
(playerNamedRegions.isEmpty() ? "" : "specify or ") +
"stand in the claim where you wish to trust this person.");
Expand All @@ -75,7 +75,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
TrustMeta trustMeta = null;

boolean allClaims = false;
if (args.length >= 2 && args[1].equalsIgnoreCase("all")) {
if (args.length >= 2 && args[0].equalsIgnoreCase("all")) {
allClaims = true;
} else {
// Make sure the sender has permission to modify trust levels
Expand Down

0 comments on commit b208e03

Please sign in to comment.