Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit b3a17af

Browse files
authored
Merge pull request #206 from SavageLLC/minorfixes
Fixes #205 and /f seepaypal
2 parents 12c69fd + 3ccc292 commit b3a17af

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public class CmdPaypalSee extends FCommand {
99
public CmdPaypalSee() {
1010
aliases.add("seepaypal");
11-
requiredArgs.add("faction");
11+
optionalArgs.put("faction", "your");
1212

1313
this.requirements = new CommandRequirements.Builder(Permission.ADMIN)
1414
.build();
@@ -20,12 +20,12 @@ public void perform(CommandContext context) {
2020
context.msg(TL.GENERIC_DISABLED);
2121
return;
2222
}
23-
Faction faction = context.argAsFaction(0);
23+
Faction faction = context.argIsSet(0) ? context.argAsFaction(0) : context.fPlayer.getFaction();
2424

2525
if (faction == null)
2626
return;
2727

28-
if (!faction.isWilderness() && !faction.isSafeZone() && !faction.isWarZone()) {
28+
if (faction.isWilderness() || faction.isSafeZone() || faction.isWarZone()) {
2929
context.msg(TL.COMMAND_PAYPALSEE_FACTION_NOFACTION.toString(), context.player.getName());
3030
return;
3131
}

src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void perform(CommandContext context) {
5252

5353
@Override
5454
public boolean work() {
55-
boolean success = unClaim(new FLocation(context.player), context);
55+
boolean success = unClaim(currentFLocation(), context);
5656
if (success) {
5757
failCount = 0;
5858
} else if (failCount++ >= limit) {

src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java

-2
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,6 @@ public boolean canClaimForFactionAtLocation(Faction forFaction, FLocation flocat
794794
error = SavageFactions.plugin.txt.parse(TL.CLAIM_CANTCLAIM.toString(), forFaction.describeTo(this));
795795
} else if (forFaction == currentFaction) {
796796
error = SavageFactions.plugin.txt.parse(TL.CLAIM_ALREADYOWN.toString(), forFaction.describeTo(this, true));
797-
} else if (this.getRole().value < Role.MODERATOR.value) {
798-
error = SavageFactions.plugin.txt.parse(TL.CLAIM_MUSTBE.toString(), Role.MODERATOR.getTranslation());
799797
} else if (forFaction.getFPlayers().size() < Conf.claimsRequireMinFactionMembers) {
800798
error = SavageFactions.plugin.txt.parse(TL.CLAIM_MEMBERS.toString(), Conf.claimsRequireMinFactionMembers);
801799
} else if (currentFaction.isSafeZone()) {

0 commit comments

Comments
 (0)