public void run() {
try {
final List<PPackage> packages = database.getPackages(player.getName());
Bukkit.getScheduler().runTask(Packages.instance, new Runnable() {
public void run() {
Bukkit.getPluginManager().callEvent(new PackageLoadEvent(player, packages));
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
});
} else {
try {
Bukkit.getPluginManager().callEvent(new PackageLoadEvent(player, database.getPackages(player.getName())));
} catch (Exception e) {
e.printStackTrace();
}
}
}