Fix WorldManager injection

This commit is contained in:
Alexander Söderberg 2020-07-23 14:56:06 +02:00
parent 17d358f8fe
commit b9a8846ee9

View File

@ -30,6 +30,7 @@ import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Stage;
import com.google.inject.TypeLiteral;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
import com.plotsquared.bukkit.inject.BackupModule;
import com.plotsquared.bukkit.inject.BukkitModule;
@ -1111,4 +1112,8 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
return BukkitWorld.of(worldName);
}
@Override @Nonnull public PlatformWorldManager<?> getWorldManager() {
return getInjector().getInstance(Key.get(new TypeLiteral<PlatformWorldManager<World>>() {}));
}
}