This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/1.6.x' into 1.6.x
- Loading branch information
Showing
16 changed files
with
216 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.massivecraft.factions.cmd; | ||
|
||
import com.massivecraft.factions.Faction; | ||
import com.massivecraft.factions.P; | ||
import com.massivecraft.factions.struct.Permission; | ||
import com.massivecraft.factions.zcore.util.TL; | ||
import org.bukkit.ChatColor; | ||
|
||
public class CmdPaypalSee extends FCommand{ | ||
public CmdPaypalSee() { | ||
aliases.add("seepaypal"); | ||
aliases.add("getpaypal"); | ||
requiredArgs.add("faction"); | ||
permission = Permission.ADMIN.node; | ||
disableOnLock = false; | ||
senderMustBePlayer = false; | ||
senderMustBeMember = false; | ||
senderMustBeModerator = false; | ||
senderMustBeColeader = false; | ||
senderMustBeAdmin = false; | ||
} | ||
|
||
public void perform() { | ||
if (!P.p.getConfig().getBoolean("fpaypal.Enabled")) { | ||
fme.msg(TL.GENERIC_DISABLED); | ||
} else { | ||
Faction faction = argAsFaction(0); | ||
String paypal = argAsString(1); | ||
|
||
if (faction != null) { | ||
if (!faction.isWilderness() && !faction.isSafeZone() && !faction.isWarZone()) { | ||
if (faction.getPaypal() != null) { | ||
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_PAYPAL.toString(), faction.getTag(), faction.getPaypal()); | ||
} else { | ||
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_NOTSET.toString(), faction.getTag(), faction.getPaypal()); | ||
} | ||
|
||
} else { | ||
fme.msg(TL.COMMAND_PAYPALSEE_FACTION_NOFACTION.toString(), me.getName()); | ||
} | ||
} | ||
} | ||
} | ||
|
||
public TL getUsageTranslation() { | ||
return TL.COMMAND_PAYPALSEE_DESCRIPTION; | ||
} | ||
} | ||
|
||
|
38 changes: 38 additions & 0 deletions
38
src/main/java/com/massivecraft/factions/cmd/CmdPaypalSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.massivecraft.factions.cmd; | ||
|
||
import com.massivecraft.factions.P; | ||
import com.massivecraft.factions.struct.Permission; | ||
import com.massivecraft.factions.zcore.util.TL; | ||
|
||
public class CmdPaypalSet extends FCommand{ | ||
|
||
public CmdPaypalSet() { | ||
this.aliases.add("setpaypal"); | ||
this.aliases.add("paypal"); | ||
this.requiredArgs.add("email"); | ||
this.permission = Permission.PAYPALSET.node; | ||
this.disableOnLock = false; | ||
this.senderMustBePlayer = true; | ||
this.senderMustBeMember = false; | ||
this.senderMustBeModerator = false; | ||
this.senderMustBeColeader = true; | ||
this.senderMustBeAdmin = false; | ||
} | ||
|
||
public void perform() { | ||
if (!P.p.getConfig().getBoolean("fpaypal.Enabled")) { | ||
fme.msg(TL.GENERIC_DISABLED); | ||
} else { | ||
String paypal = argAsString(0); | ||
if (paypal != null) { | ||
myFaction.paypalSet(paypal); | ||
fme.msg(TL.COMMAND_PAYPALSET_SUCCESSFUL, paypal); | ||
} | ||
} | ||
} | ||
|
||
public TL getUsageTranslation() { | ||
return TL.COMMAND_PAYPALSET_DESCRIPTION; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.