Skip to content

Commit

Permalink
2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hostadam committed Jan 6, 2025
1 parent 2722ef8 commit 7d82a1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/github/hostadam/board/BoardObjective.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand All @@ -26,7 +27,7 @@ public class BoardObjective {
public BoardObjective(Scoreboard scoreboard) {
this.scoreboard = scoreboard;
this.title = "Loading...";
this.lines = new HashMap<>();
this.lines = new ConcurrentHashMap<>();
this.objective = scoreboard.registerNewObjective("buffered", Criteria.DUMMY, this.title);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void register(Object object) {
for(Method method : object.getClass().getMethods()) {
if(!method.isAnnotationPresent(AresCommand.class)
|| method.getParameterCount() < 1
|| !method.getParameters()[0].getType().isAssignableFrom(CommandSender.class)) {
|| CommandSender.class.isAssignableFrom(method.getParameters()[0].getType())) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void sendUsage(CommandSender sender, String[] args, int page) {
subCommands = this.subcommands.subList(startOfRange, Math.min(endOfRange, this.subcommands.size()));
}

String mainLabel = data.getCommand().labels()[0];
String mainLabel = data.getCommand().labels()[0].toUpperCase();
sender.sendMessage(" ");
sender.sendMessage("§e§l" + mainLabel + " §7(Command Help)");
sender.sendMessage("§7§o<> = required, [] = optional");
Expand Down

0 comments on commit 7d82a1e

Please sign in to comment.