Skip to content

Commit

Permalink
some more minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Mar 26, 2024
1 parent a054e53 commit d051495
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ repositories {

dependencies {
compileOnly("com.destroystokyo.paper:paper-api:1.12.2-R0.1-SNAPSHOT")
compileOnly("org.jetbrains:annotations:24.1.0")
compileOnly("me.clip:placeholderapi:2.11.5")

implementation("net.kyori:adventure-platform-bukkit:4.3.2")
Expand All @@ -32,7 +33,7 @@ dependencies {

implementation("org.bstats:bstats-bukkit:3.0.2")
implementation("com.github.thatsmusic99:ConfigurationMaster-API:v2.0.0-rc.1")
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3")
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3") // 2.X for Java 8 targets
}

group = "me.xginko.betterworldstats"
Expand Down Expand Up @@ -64,8 +65,8 @@ tasks {
archiveFileName.set("BetterWorldStats-${version}.jar")
relocate("net.kyori", "me.xginko.betterworldstats.libs.kyori")
relocate("org.bstats", "me.xginko.betterworldstats.libs.bstats")
relocate("io.github.thatsmusic99.configurationmaster", "me.xginko.betterworldstats.libs.configmaster")
relocate("com.github.benmanes.caffeine", "me.xginko.betterworldstats.libs.caffeine")
relocate("io.github.thatsmusic99.configurationmaster", "me.xginko.betterworldstats.libs.configmaster")
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public boolean canRegister() {
}

@Override
@SuppressWarnings({"deprecation"})
public @NotNull String getVersion() {
return BetterWorldStats.getInstance().getDescription().getVersion();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,17 @@ public void perform(CommandSender sender, String[] args) {
return;
}

String name, version, website, author;
final PluginDescriptionFile pluginYML = BetterWorldStats.getInstance().getDescription();
name = pluginYML.getName();
version = pluginYML.getVersion();
website = pluginYML.getWebsite();
author = pluginYML.getAuthors().get(0);

KyoriUtil.sendMessage(sender, Component.newline()
.append(
Component.text(name + " " + version)
Component.text(pluginYML.getName() + " " + pluginYML.getVersion())
.color(NamedTextColor.GOLD)
.clickEvent(ClickEvent.openUrl(website))
.clickEvent(ClickEvent.openUrl(pluginYML.getWebsite()))
)
.append(Component.text(" by ").color(NamedTextColor.GRAY))
.append(
Component.text(author)
Component.text(pluginYML.getAuthors().get(0))
.color(NamedTextColor.WHITE)
.clickEvent(ClickEvent.openUrl("https://github.com/xGinko"))
)
Expand Down

0 comments on commit d051495

Please sign in to comment.