Fix shading mess and make the plugin start

This commit is contained in:
Alexander Söderberg
2020-08-16 12:43:57 +02:00
parent 12def37194
commit 28d6d4db92
4 changed files with 21 additions and 4 deletions

View File

@ -29,6 +29,7 @@ import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Singleton;
import com.google.inject.Stage;
import com.google.inject.TypeLiteral;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
@ -161,7 +162,7 @@ import static com.plotsquared.core.util.PremiumVerification.getResourceID;
import static com.plotsquared.core.util.PremiumVerification.getUserID;
import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
@SuppressWarnings("unused")
@SuppressWarnings("unused") @Singleton
public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPlatform<Player> {
private static final Logger logger = LoggerFactory.getLogger("P2/" + BukkitPlatform.class.getSimpleName());

View File

@ -84,6 +84,7 @@ public class BukkitModule extends AbstractModule {
bind(PlayerManager.class).to(BukkitPlayerManager.class);
bind(JavaPlugin.class).toInstance(bukkitPlatform);
bind(PlotPlatform.class).toInstance(bukkitPlatform);
bind(BukkitPlatform.class).toInstance(bukkitPlatform);
bind(IndependentPlotGenerator.class).annotatedWith(DefaultGenerator.class).to(HybridGen.class);
// Console actor
@Nonnull ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();

View File

@ -25,6 +25,7 @@
*/
package com.plotsquared.bukkit.listener;
import com.google.inject.Inject;
import com.plotsquared.bukkit.BukkitPlatform;
import com.plotsquared.bukkit.placeholder.MVdWPlaceholders;
import com.plotsquared.core.PlotSquared;
@ -35,11 +36,13 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
import javax.annotation.Nonnull;
public class ServerListener implements Listener {
private final BukkitPlatform plugin;
public ServerListener(BukkitPlatform plugin) {
@Inject public ServerListener(@Nonnull final BukkitPlatform plugin) {
this.plugin = plugin;
}