Merge pull request #58 from Badbird5907/master

Accidentally pushed to my own repo
This commit is contained in:
Badbird5907
2023-01-05 19:52:58 -05:00
committed by GitHub
7 changed files with 31 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
plugins { plugins {
id("java") id("java")
id("net.nuggetmc.java-conventions")
} }
group = "net.nuggetmc" group = "net.nuggetmc"
version = "3.3.1-BETA"
repositories { repositories {
mavenCentral() mavenCentral()

View File

@@ -1,10 +1,10 @@
plugins { plugins {
`java-library` `java-library`
id("io.papermc.paperweight.userdev") version "1.3.7" id("io.papermc.paperweight.userdev") version "1.3.7"
id("net.nuggetmc.java-conventions")
} }
group = "net.nuggetmc" group = "net.nuggetmc"
version = "3.3.1-BETA"
description = "TerminatorPlus" description = "TerminatorPlus"
java { java {

View File

@@ -235,8 +235,11 @@ public class BotCommand extends CommandInstance {
} }
@Command( @Command(
name = "count", name = "count",
desc = "Counts the amount of bots on screen by name." desc = "Counts the amount of bots on screen by name.",
aliases = {
"list"
}
) )
public void count(CommandSender sender) { public void count(CommandSender sender) {
List<String> names = manager.fetchNames(); List<String> names = manager.fetchNames();
@@ -244,7 +247,7 @@ public class BotCommand extends CommandInstance {
List<Entry<String, Integer>> entries = freqMap.entrySet().stream() List<Entry<String, Integer>> entries = freqMap.entrySet().stream()
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toList()); .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toList());
sender.sendMessage(ChatUtils.LINE); sender.sendMessage(ChatUtils.LINE);
entries.forEach(en -> sender.sendMessage(ChatColor.GREEN + en.getKey() entries.forEach(en -> sender.sendMessage(ChatColor.GREEN + en.getKey()
+ ChatColor.RESET + " - " + ChatColor.BLUE + en.getValue().toString() + ChatColor.RESET)); + ChatColor.RESET + " - " + ChatColor.BLUE + en.getValue().toString() + ChatColor.RESET));
sender.sendMessage("Total bots: " + ChatColor.BLUE + freqMap.values().stream().reduce(0, Integer::sum) + ChatColor.RESET); sender.sendMessage("Total bots: " + ChatColor.BLUE + freqMap.values().stream().reduce(0, Integer::sum) + ChatColor.RESET);

View File

@@ -1,10 +1,8 @@
plugins { plugins {
id("java") id("java")
id("net.nuggetmc.java-conventions")
} }
group = "net.nuggetmc"
version = "3.3.1-BETA"
val jarName = "TerminatorPlus-" + version; val jarName = "TerminatorPlus-" + version;
repositories { repositories {

11
buildSrc/build.gradle.kts Normal file
View File

@@ -0,0 +1,11 @@
plugins {
// Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
`kotlin-dsl`
}
repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}
dependencies {
}

View File

@@ -0,0 +1,6 @@
plugins {
`java-library`
}
group = "net.nuggetmc"
version = "4.0.0-BETA"

View File

@@ -8,3 +8,5 @@ pluginManagement {
rootProject.name = "TerminatorPlus" rootProject.name = "TerminatorPlus"
include("TerminatorPlus-Plugin") include("TerminatorPlus-Plugin")
include("TerminatorPlus-API") include("TerminatorPlus-API")
// set the version