mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 19:18:29 +01:00
allow money to be put in kits using the currency symbol before the amount
This commit is contained in:
parent
587f532991
commit
332a59f3fc
@ -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 New Issue
Block a user