mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 12:16:44 +01:00
perf: Get rid of Guice overhead when accessing the plot area manager (#3315)
Fixes #3311 Co-authored-by: Jordan <dordsor21@gmail.com>
This commit is contained in:
parent
48c7a3e94e
commit
b97e843849
@ -1180,6 +1180,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
return this.injector;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull PlotAreaManager plotAreaManager() {
|
||||
return this.plotAreaManager;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Locale getLocale() {
|
||||
|
@ -38,6 +38,7 @@ import com.plotsquared.core.inject.annotations.DefaultGenerator;
|
||||
import com.plotsquared.core.location.World;
|
||||
import com.plotsquared.core.permissions.PermissionHandler;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.queue.GlobalBlockQueue;
|
||||
import com.plotsquared.core.util.ChunkManager;
|
||||
import com.plotsquared.core.util.EconHandler;
|
||||
@ -268,6 +269,13 @@ public interface PlotPlatform<P> extends LocaleHolder {
|
||||
return injector().getInstance(ChunkManager.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link PlotAreaManager} implementation.
|
||||
*
|
||||
* @return the PlotAreaManager
|
||||
*/
|
||||
@NonNull PlotAreaManager plotAreaManager();
|
||||
|
||||
/**
|
||||
* Get the platform specific console {@link Audience}
|
||||
*
|
||||
|
@ -283,7 +283,7 @@ public class PlotSquared {
|
||||
* @return Plot area manager
|
||||
*/
|
||||
public @NonNull PlotAreaManager getPlotAreaManager() {
|
||||
return this.platform.injector().getInstance(PlotAreaManager.class);
|
||||
return this.platform.plotAreaManager();
|
||||
}
|
||||
|
||||
public void startExpiryTasks() {
|
||||
|
Loading…
Reference in New Issue
Block a user