mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
allow money to be put in kits using the currency symbol before the amount
This commit is contained in:
parent
587f532991
commit
332a59f3fc
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,13 @@ public class Kit
|
|||
boolean spew = false;
|
||||
for (String d : items)
|
||||
{
|
||||
if (d.startsWith(ess.getSettings().getCurrencySymbol()))
|
||||
{
|
||||
Double value = Double.parseDouble(d.substring(ess.getSettings().getCurrencySymbol().length()).trim());
|
||||
Trade t = new Trade(value, ess);
|
||||
t.pay(user);
|
||||
continue;
|
||||
}
|
||||
final String[] parts = d.split(" ");
|
||||
final String[] item = parts[0].split("[:+',;.]", 2);
|
||||
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();
|
||||
|
|
Loading…
Reference in a new issue