Fix annoying guice injection issue

This commit is contained in:
Alexander Söderberg 2020-07-23 15:40:43 +02:00
parent 384a6730a4
commit d8e80daa93

View File

@ -124,7 +124,6 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Chunk; import org.bukkit.Chunk;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
@ -1118,8 +1117,9 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
return getInjector().getInstance(Key.get(new TypeLiteral<PlatformWorldManager<World>>() {})); return getInjector().getInstance(Key.get(new TypeLiteral<PlatformWorldManager<World>>() {}));
} }
@Override @Nonnull public PlayerManager<? extends PlotPlayer<Player>, ? extends Player> getPlayerManager() { @Override @Nonnull @SuppressWarnings("ALL")
return getInjector().getInstance(Key.get(new TypeLiteral<PlayerManager<BukkitPlayer, Player>>() {})); public PlayerManager<? extends PlotPlayer<Player>, ? extends Player> getPlayerManager() {
return (PlayerManager<BukkitPlayer, Player>) getInjector().getInstance(PlayerManager.class);
} }
} }