mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-07 04:53:11 +00:00
Added enchantment to /give and /item
Updated plugin.yml
This commit is contained in:
parent
b8f9a4b96f
commit
098072517a
5 changed files with 85 additions and 18 deletions
|
@ -129,7 +129,7 @@ public class BukkitConstructor extends Constructor
|
|||
for (int i = 2; i < split1.length; i++)
|
||||
{
|
||||
final String[] split3 = split1[0].split("[:+',;.]", 2);
|
||||
if (split3.length != 2)
|
||||
if (split3.length < 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class BukkitConstructor extends Constructor
|
|||
continue;
|
||||
}
|
||||
int level = enchantment.getStartLevel();
|
||||
if (NUMPATTERN.matcher(split3[1]).matches())
|
||||
if (split3.length == 2 && NUMPATTERN.matcher(split3[1]).matches())
|
||||
{
|
||||
level = Integer.parseInt(split3[1]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue