This commit is contained in:
Leijurv 2018-09-30 08:03:33 -07:00
parent 3184eaf595
commit d58ad6f68f
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -31,15 +31,14 @@ import java.util.ServiceLoader;
* @author Brady * @author Brady
* @since 9/23/2018 * @since 9/23/2018
*/ */
public class BaritoneAPI { public final class BaritoneAPI {
private static IBaritoneProvider baritone; private final static IBaritoneProvider baritone;
private static Settings settings; private final static Settings settings;
static { static {
ServiceLoader<IBaritoneProvider> baritoneLoader = ServiceLoader.load(IBaritoneProvider.class); ServiceLoader<IBaritoneProvider> baritoneLoader = ServiceLoader.load(IBaritoneProvider.class);
Iterator<IBaritoneProvider> instances = baritoneLoader.iterator(); Iterator<IBaritoneProvider> instances = baritoneLoader.iterator();
if (instances.hasNext())
baritone = instances.next(); baritone = instances.next();
settings = new Settings(); settings = new Settings();