use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.
the class CommandManager method resetCommand.
private void resetCommand() {
if (COMMAND_LINE.getArgumentCount() >= 3) {
String arg3 = COMMAND_LINE.getArgument(3);
String arg2 = COMMAND_LINE.getArgument(2);
int bannerID;
try {
bannerID = Integer.parseInt(COMMAND_LINE.getArgument(1));
} catch (NumberFormatException e) {
return;
}
boolean yes = (arg3.equalsIgnoreCase("y") || arg3.equalsIgnoreCase("yes"));
if (arg2.equalsIgnoreCase("c") || arg2.equalsIgnoreCase("w") || arg2.equalsIgnoreCase("a")) {
new Reset(CHANNEL, DISCORD_ID, bannerID, arg2, yes);
} else {
CHANNEL.sendMessage(new WarningMessage("COMMAND ERROR", "Use '" + commandPrefix + "**reset** [BannerID] [c/w/a]'").get().build());
}
} else if (COMMAND_LINE.getArgumentCount() >= 2) {
String arg2 = COMMAND_LINE.getArgument(2);
int bannerID;
try {
bannerID = Integer.parseInt(COMMAND_LINE.getArgument(1));
} catch (NumberFormatException e) {
return;
}
if (arg2.equalsIgnoreCase("c") || arg2.equalsIgnoreCase("w") || arg2.equalsIgnoreCase("a")) {
new Reset(CHANNEL, DISCORD_ID, bannerID, arg2, false);
} else {
CHANNEL.sendMessage(new WarningMessage("COMMAND ERROR", "Use '" + commandPrefix + "**reset** [BannerID] [c/w/a]'").get().build());
}
} else if (COMMAND_LINE.getArgumentCount() >= 1) {
String arg1 = COMMAND_LINE.getArgument(1);
if (arg1.equalsIgnoreCase("y") || arg1.equalsIgnoreCase("yes")) {
new Reset(CHANNEL, DISCORD_ID);
}
} else {
new Reset(CHANNEL);
}
}
use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.
the class Memorial method run.
@Override
protected void run() {
switch(CHOICE.toLowerCase()) {
case "s":
case "si":
if (userMemoryDiamonds < singleScoutPrice) {
CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
return;
}
if (CHOICE.equalsIgnoreCase("si") && !IMAGE_DISABLED) {
generateImage = true;
}
userMemoryDiamonds -= singleScoutPrice;
USER.setMemoryDiamonds(userMemoryDiamonds);
doSinglePull();
break;
default:
CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Only `single` scouts are available.").get().build());
return;
}
if (stopScout)
return;
displayAndSave();
}
use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.
the class RecordCrystal method run.
@Override
protected void run() {
switch(CHOICE.toLowerCase()) {
case "s":
case "si":
if (userMemoryDiamonds < singleScoutPrice) {
CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
return;
}
if (CHOICE.equalsIgnoreCase("si") && !IMAGE_DISABLED) {
generateImage = true;
}
userMemoryDiamonds -= singleScoutPrice;
USER.setMemoryDiamonds(userMemoryDiamonds);
doSinglePull();
break;
case "m":
case "mi":
if (userMemoryDiamonds < multiScoutPrice) {
CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
return;
}
if (CHOICE.equalsIgnoreCase("mi") && !IMAGE_DISABLED) {
generateImage = true;
}
userMemoryDiamonds -= multiScoutPrice;
USER.setMemoryDiamonds(userMemoryDiamonds);
doMultiPull();
updateBannerData();
break;
case "rc":
case "rci":
if (CHOICE.equalsIgnoreCase("rci") && !IMAGE_DISABLED) {
generateImage = true;
}
userRecordCrystals = USER.getBannerData(SELECTED_BANNER.getBannerName());
if (userRecordCrystals < 10) {
CHANNEL.sendMessage(new WarningMessage("INSUFFICIENT RECORD CRYSTALS", "You need 10 record crystals to do a record crystal scout.").get().build());
return;
}
userRecordCrystals -= 10;
USER.changeValue(SELECTED_BANNER.getBannerName(), userRecordCrystals);
guaranteedScout = true;
doSinglePull();
break;
default:
CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Only `single`, `multi`, and `record crystal` scouts are available.").get().build());
return;
}
if (stopScout)
return;
displayAndSave();
}
use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.
the class StepUpv3 method run.
@Override
protected void run() {
switch(CHOICE.toLowerCase()) {
case "s":
case "si":
if (userMemoryDiamonds < singleScoutPrice) {
CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
return;
}
if (CHOICE.equalsIgnoreCase("si") && !IMAGE_DISABLED) {
generateImage = true;
}
userMemoryDiamonds -= singleScoutPrice;
USER.setMemoryDiamonds(userMemoryDiamonds);
doSinglePull();
break;
case "m":
case "mi":
if (userMemoryDiamonds < multiScoutPrice) {
CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
return;
}
if (CHOICE.equalsIgnoreCase("mi") && !IMAGE_DISABLED) {
generateImage = true;
}
userMemoryDiamonds -= multiScoutPrice;
USER.setMemoryDiamonds(userMemoryDiamonds);
doMultiPull();
updateBannerData();
break;
default:
CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Only `single` and `multi` scouts are available.").get().build());
return;
}
if (stopScout)
return;
displayAndSave();
}
Aggregations