// 1x Lvl 1
case 1:
int n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1); // efficiency
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1); // unbreaking
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1); // fortune
break;
}
break;
// 2x Lvl 1
case 2:
n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
break;
}
break;
// 1x 2, 1x 1
case 3:
n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
}
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 2);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
}
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 2);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
}
break;
}
break;
// 2x 2, 1x 1
case 4:
n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 2);
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 2);
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
break;
}
break;
// 1x 3, 2x 1
case 5:
n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 3);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 3);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 3);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
break;
}
break;
// 1x 3, 1x 2, 1x 1
case 6:
n = generator.nextInt(3);
switch (n) {
case 0:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
}
break;
case 1:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 3);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
}
break;
case 2:
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(35), 3);
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 1);
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(32), 2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(34), 1);
}
break;
}
break;
}
}
// ****************** Bogen ********************
if (event.getCurrentItem().getTypeId() == 261) {
switch (ConflictPlugin.skillCraftBow.get(player.getName())) {
case 1:
int n = generator.nextInt(2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 1); // Damage 1
break;
case 2:
n = generator.nextInt(2);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 2); // Damage 2
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(49), 1); // Punch 1
}
break;
case 3:
n = generator.nextInt(2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 2); // Damage 2
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(50), 1); // Flame
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(49), 1); // Punch 1
}
break;
case 4:
n = generator.nextInt(2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 1); // Damage 1
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(50), 1); // Flame
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(49), 1); // Punch 1
break;
case 5:
n = generator.nextInt(2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 2); // Damage 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(50), 1); // Flame
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(49), 1); // Punch 1
break;
case 6:
n = generator.nextInt(2);
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(48), 3); // Damage 3
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(50), 1); // Flame
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(49), 1); // Punch 1
break;
}
}
// ****************** Sword ********************
if (event.getCurrentItem().getTypeId() == 267 || event.getCurrentItem().getTypeId() == 276
|| event.getCurrentItem().getTypeId() == 283) {
switch (ConflictPlugin.skillCraftSword.get(player.getName())) {
case 1:
int n = generator.nextInt(4);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 1); // Damage 1
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(17), 1); // Undead 1
} else if (n == 2) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(18), 1); // Arthropod 1
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Punch 1
}
break;
case 2:
n = generator.nextInt(5);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 2); // Damage 2
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(17), 2); // Undead
} else if (n == 2) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(18), 2); // Arth
} else if (n == 3) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Punch
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // fire
}
break;
case 3:
n = generator.nextInt(3);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 2); // Damage 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Punch 1
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 2); // Dam 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // Fire
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 2); // Knock 2
}
break;
case 4:
n = generator.nextInt(3);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Damage 2
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 2); // Dam 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // Fire
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 2); // Damage 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Knock 2
}
break;
case 5:
n = generator.nextInt(3);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Damage 2
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Dam 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // Fire
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Damage 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Knock 2
}
break;
case 6:
n = generator.nextInt(3);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Damage 2
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Dam 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Knock
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // Fire
} else {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(16), 3); // Damage 2
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(19), 1); // Knock
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(20), 1); // Fire
}
break;
}
}
// ****************** Armor ********************
if (event.getCurrentItem().getTypeId() >= 306 && event.getCurrentItem().getTypeId() <= 317) {
switch (ConflictPlugin.skillCraftArmor.get(player.getName())) {
case 1:
int n = generator.nextInt(3);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(0), 1);
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(3), 1);
} else if (n == 2) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(4), 1);
}
break;
case 2:
n = generator.nextInt(4);
if (n == 0) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(0), 2);
} else if (n == 1) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(1), 1);
} else if (n == 2) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(3), 2);
} else if (n == 3) {
event.getCurrentItem().addEnchantment(new EnchantmentWrapper(4), 2);
}
break;
// case 3:
// n = generator.nextInt(7);