Catch kit conversion.

This commit is contained in:
Brianna 2020-06-11 09:08:56 -05:00
parent 748538742c
commit af788389cd

View File

@ -38,6 +38,7 @@ public class Convert {
} }
private static void convertKits(Hook hook) { private static void convertKits(Hook hook) {
try {
Set<String> kits = hook.getKits(); Set<String> kits = hook.getKits();
for (String kit : kits) { for (String kit : kits) {
Kit kitObj = UltimateKits.getInstance().getKitManager().addKit(new Kit(kit)); Kit kitObj = UltimateKits.getInstance().getKitManager().addKit(new Kit(kit));
@ -49,6 +50,9 @@ public class Convert {
kitObj.setDelay(hook.getDelay(kit)); kitObj.setDelay(hook.getDelay(kit));
} }
UltimateKits.getInstance().saveKits(true); UltimateKits.getInstance().saveKits(true);
} catch (NoSuchMethodError | NoClassDefFoundError e) {
System.out.println("UltimateKits conversion failed.");
}
} }
private static boolean isInJsonFormat() { private static boolean isInJsonFormat() {