diff options
author | KHobbits <rob@khobbits.co.uk> | 2014-01-03 08:16:17 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-01-03 08:16:17 +0000 |
commit | 3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935 (patch) | |
tree | 075809645d8e95ece32b45bf9d5cd3715b1c736c | |
parent | d48c02021de9e2cfbb215d170e383831372bfae8 (diff) | |
download | Essentials-3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935.tar Essentials-3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935.tar.gz Essentials-3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935.tar.lz Essentials-3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935.tar.xz Essentials-3fecd3138d6d0aa3fc9bcfce8ed72ee6c8877935.zip |
Check command cost, before running kit delay check, prevent accidentally delaying unran commands.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkit.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java index a7fc4e2e5..d7f4c2a93 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkit.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkit.java @@ -80,11 +80,10 @@ public class Commandkit extends EssentialsCommand final List<String> items = Kit.getItems(ess, userTo, kitName, kit); - Kit.checkTime(userFrom, kitName, kit); - final Trade charge = new Trade("kit-" + kitName, ess); charge.isAffordableFor(userFrom); + Kit.checkTime(userFrom, kitName, kit); Kit.expandItems(ess, userTo, items); charge.charge(userFrom); |