From 63ce3292aa530e16110c7aa5309e23b9af2c864c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Thu, 23 Jul 2020 15:03:27 +0200 Subject: [PATCH] Fix PlayerManager injection --- .../main/java/com/plotsquared/bukkit/BukkitPlatform.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java index 23ed985c9..bb27113c5 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java @@ -43,6 +43,7 @@ import com.plotsquared.bukkit.listener.SingleWorldListener; import com.plotsquared.bukkit.listener.WorldEvents; import com.plotsquared.bukkit.placeholder.PlaceholderFormatter; import com.plotsquared.bukkit.placeholder.Placeholders; +import com.plotsquared.bukkit.player.BukkitPlayer; import com.plotsquared.bukkit.player.BukkitPlayerManager; import com.plotsquared.bukkit.util.BukkitChatManager; import com.plotsquared.bukkit.util.BukkitUtil; @@ -105,6 +106,7 @@ import com.plotsquared.core.util.EventDispatcher; import com.plotsquared.core.util.FileUtils; import com.plotsquared.core.util.PermHandler; import com.plotsquared.core.util.PlatformWorldManager; +import com.plotsquared.core.util.PlayerManager; import com.plotsquared.core.util.PremiumVerification; import com.plotsquared.core.util.ReflectionUtils; import com.plotsquared.core.util.SetupUtils; @@ -1141,7 +1143,7 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass; return names; } - @Override public com.plotsquared.core.location.World getPlatformWorld(@Nonnull final String worldName) { + @Override @Nonnull public com.plotsquared.core.location.World getPlatformWorld(@Nonnull final String worldName) { return BukkitWorld.of(worldName); } @@ -1149,4 +1151,8 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass; return getInjector().getInstance(Key.get(new TypeLiteral>() {})); } + @Override @Nonnull public PlayerManager, ? extends Player> getPlayerManager() { + return getInjector().getInstance(Key.get(new TypeLiteral>() {})); + } + }