mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 12:31:26 +02:00
allow money to be put in kits using the currency symbol before the amount
This commit is contained in:
@@ -102,6 +102,13 @@ public class Kit
|
|||||||
boolean spew = false;
|
boolean spew = false;
|
||||||
for (String d : items)
|
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[] parts = d.split(" ");
|
||||||
final String[] item = parts[0].split("[:+',;.]", 2);
|
final String[] item = parts[0].split("[:+',;.]", 2);
|
||||||
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();
|
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();
|
||||||
|
Reference in New Issue
Block a user