Skip to content

Commit

Permalink
feat: Added initialization time
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed May 11, 2023
1 parent 8b8d36a commit 3b02d8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dependencies {
compileOnlyApi(libs.velocity)
}



tasks {
compileJava {
options.release.set(17)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static CapsCheck.Builder builder(){
public static class Builder implements AbstractBuilder<CapsCheck> {
private int limit;
private ControlType controlType;
Builder(){}
Builder() {}

/**
* Set the new caps limit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ public class ChatRegulator implements ChatRegulatorAPI {

@Subscribe
public void onProxyInitialization(final ProxyInitializeEvent event) {
final long start = System.currentTimeMillis();
this.injector = injector.createChildInjector(
new ConfigurationModule(),
new ProviderModule(),
new PluginModule(statistics, playerManager)
);
injector.injectMembers(playerManager);
logger.info(miniMessage().deserialize("<gradient:#DAE2F8:#D4D3DD>Starting plugin..."));
logger.info(miniMessage().deserialize("<gradient:#A0E2F8:#D4A0FF>Starting plugin..."));

Stream.of(
ChatListener.class,
Expand All @@ -77,7 +78,8 @@ public void onProxyInitialization(final ProxyInitializeEvent event) {

injector.getInstance(RegulatorCommand.class).register();

logger.info(miniMessage().deserialize("<gradient:#DAE2F8:#D4D3DD>has been started"));
final long end = System.currentTimeMillis();
logger.info(miniMessage().deserialize("<gradient:#A0E2F8:#D4A0FF>Correctly started in "+(end-start)+"ms"));
}

@Override
Expand Down

0 comments on commit 3b02d8a

Please sign in to comment.