Only leaders able to set their factions PayPal and Discord.
Signed-off-by: DroppingAnvil <dr0pping.4nvi1@gmail.com>
This commit is contained in:
parent
73ba6fb608
commit
07db3fd015
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdPaypalSet extends FCommand {
|
||||
@ -27,6 +28,11 @@ public class CmdPaypalSet extends FCommand {
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED);
|
||||
return;
|
||||
}
|
||||
if (context.fPlayer.getRole() != Role.LEADER && !context.fPlayer.isAdminBypassing()) {
|
||||
//TODO: Create f perm for this
|
||||
context.msg(TL.GENERIC_NOPERMISSION, "set your factions PayPal!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.args.size() == 1) {
|
||||
if (isEmail(context.argAsString(0))) {
|
||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FactionsPlugin;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdSetDiscord extends FCommand {
|
||||
@ -26,6 +27,11 @@ public class CmdSetDiscord extends FCommand {
|
||||
context.fPlayer.msg(TL.GENERIC_DISABLED, "discord");
|
||||
return;
|
||||
}
|
||||
if (context.fPlayer.getRole() != Role.LEADER && !context.fPlayer.isAdminBypassing()) {
|
||||
//TODO: Create f perm for this
|
||||
context.msg(TL.GENERIC_NOPERMISSION, "set your factions Discord!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.args.size() == 1) {
|
||||
if (isDiscordInvite(context.argAsString(0))) {
|
||||
|
Loading…
Reference in New Issue
Block a user