mirror of
https://github.com/FirephoenixX02/RapidReport.git
synced 2026-04-25 02:56:21 +02:00
Add bStats
This commit is contained in:
parent
ef9a039d25
commit
51dc7f7a3f
4 changed files with 21 additions and 3 deletions
|
|
@ -78,6 +78,10 @@
|
||||||
<pattern>com.zaxxer.hikari</pattern>
|
<pattern>com.zaxxer.hikari</pattern>
|
||||||
<shadedPattern>me.firephoenix.hikari</shadedPattern>
|
<shadedPattern>me.firephoenix.hikari</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.bstats</pattern>
|
||||||
|
<shadedPattern>me.firephoenix.bstats</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
|
||||||
10
pom.xml
10
pom.xml
|
|
@ -109,6 +109,10 @@
|
||||||
<pattern>com.zaxxer.hikari</pattern>
|
<pattern>com.zaxxer.hikari</pattern>
|
||||||
<shadedPattern>me.firephoenix.hikari</shadedPattern>
|
<shadedPattern>me.firephoenix.hikari</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.bstats</pattern>
|
||||||
|
<shadedPattern>me.firephoenix.bstats</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
@ -157,5 +161,11 @@
|
||||||
<version>2.3.3</version>
|
<version>2.3.3</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bstats</groupId>
|
||||||
|
<artifactId>bstats-velocity</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import me.firephoenix.rapidreport.commands.ReportCommand;
|
||||||
import me.firephoenix.rapidreport.commands.ReportGUICommand;
|
import me.firephoenix.rapidreport.commands.ReportGUICommand;
|
||||||
import me.firephoenix.rapidreport.ui.UIManager;
|
import me.firephoenix.rapidreport.ui.UIManager;
|
||||||
import me.firephoenix.rapidreport.utils.DataBaseManager;
|
import me.firephoenix.rapidreport.utils.DataBaseManager;
|
||||||
|
import org.bstats.velocity.Metrics;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
@ -49,12 +50,14 @@ public class RapidReport {
|
||||||
public String chatPrefix = "<gray>[<red>RapidReport<gray>] ";
|
public String chatPrefix = "<gray>[<red>RapidReport<gray>] ";
|
||||||
@Getter
|
@Getter
|
||||||
public UIManager uiManager;
|
public UIManager uiManager;
|
||||||
|
private final Metrics.Factory metricsFactory;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public RapidReport(ProxyServer proxyServer, Logger logger, @DataDirectory final Path folder) {
|
public RapidReport(ProxyServer proxyServer, Logger logger, @DataDirectory final Path folder, Metrics.Factory metricsFactory) {
|
||||||
this.proxy = proxyServer;
|
this.proxy = proxyServer;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.dataFolderPath = folder;
|
this.dataFolderPath = folder;
|
||||||
|
this.metricsFactory = metricsFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|
@ -71,6 +74,9 @@ public class RapidReport {
|
||||||
|
|
||||||
uiManager = new UIManager();
|
uiManager = new UIManager();
|
||||||
|
|
||||||
|
//bStats
|
||||||
|
Metrics metrics = metricsFactory.make(this, 21977);
|
||||||
|
|
||||||
commandManager.register(commandManager.metaBuilder("report").plugin(this).build(), new ReportCommand());
|
commandManager.register(commandManager.metaBuilder("report").plugin(this).build(), new ReportCommand());
|
||||||
commandManager.register(commandManager.metaBuilder("reports").plugin(this).build(), new ListReportsCommand());
|
commandManager.register(commandManager.metaBuilder("reports").plugin(this).build(), new ListReportsCommand());
|
||||||
commandManager.register(commandManager.metaBuilder("closereport").plugin(this).build(), new CloseReportCommand());
|
commandManager.register(commandManager.metaBuilder("closereport").plugin(this).build(), new CloseReportCommand());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
package me.firephoenix.rapidreport.ui;
|
package me.firephoenix.rapidreport.ui;
|
||||||
|
|
||||||
import com.velocitypowered.api.command.CommandSource;
|
|
||||||
import com.velocitypowered.api.command.SimpleCommand;
|
|
||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
import dev.simplix.protocolize.api.ClickType;
|
import dev.simplix.protocolize.api.ClickType;
|
||||||
import dev.simplix.protocolize.api.chat.ChatElement;
|
import dev.simplix.protocolize.api.chat.ChatElement;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue