From b917a3b4ee1aafadfcd9776bb7ae2378159f14d6 Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Fri, 27 Mar 2020 03:08:44 -0400 Subject: [PATCH] =Fixed Bug#7 Tagging multiple people using !trade results in wrong error Fixed, added check for multiple users being tagged. --- assets/config.csv | 1 + src/commands/general/CommandTradeBeans.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/assets/config.csv b/assets/config.csv index bdc348e..ffe84af 100644 --- a/assets/config.csv +++ b/assets/config.csv @@ -247,6 +247,7 @@ "Localized Strings","TeeyInfo","Teey yourself back into existance, or teey a friend with @!" "Localized Strings","TradeBeansInfo","Give your friends some of your beans! Just don't forget to @ them!" "Localized Strings","TradeBeansIntParseError","That's not a real number! D:" +"Localized Strings","TradeBeansMultipleUsersTagged","" "Localized Strings","TradeBeansNoTargetError","Don't forget to tag who you want to give the beans to!" "Localized Strings","TradeBeansNotEnoughError","You can't give more beans than you have!" "Localized Strings","TradeBeansStealingBeans","Hey %s! Stealing is wrong! Let's see how you like it! *steals 10 beans*" diff --git a/src/commands/general/CommandTradeBeans.java b/src/commands/general/CommandTradeBeans.java index c3b17e1..75cc21a 100644 --- a/src/commands/general/CommandTradeBeans.java +++ b/src/commands/general/CommandTradeBeans.java @@ -25,6 +25,11 @@ public class CommandTradeBeans extends Command res.send(LocStrings.stub("TradeBeansNoTargetError")); return; } + if(input.mentions.length > 1) + { + res.send(LocStrings.stub("TradeBeansMultipleUsersTagged")); + return; + } int beans = 0;