Skip to content

Commit

Permalink
Minor formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Sep 10, 2023
1 parent c1f2b2b commit 52f9999
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void onEnable() {
initialize("hooks", (plugin) -> {
this.registerHooks();

if (hooks.size() > 0) {
if (!hooks.isEmpty()) {
hooks.forEach(hook -> {
try {
hook.initialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected static void registerCommodore(@NotNull BukkitHuskHomes plugin,
@NotNull org.bukkit.command.Command bukkitCommand,
@NotNull Command command) {
final InputStream commodoreFile = plugin.getResource(
"commodore/" + bukkitCommand.getName() + ".commodore"
String.format("commodore/%s.commodore", bukkitCommand.getName())
);
if (commodoreFile == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public final String getRawUsage() {

@NotNull
public final String getUsage() {
return "/" + getName() + " " + getRawUsage();
return String.format("/%s %s", getName(), getRawUsage());
}

public final void addAdditionalPermissions(@NotNull Map<String, Boolean> permissions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
public class PaperHuskHomes extends BukkitHuskHomes {

@Override
protected @NotNull EventListener registerListener() {
@NotNull
protected EventListener registerListener() {
return new PaperEventListener(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static List<String> resolveLibraries(@NotNull PluginClasspathBuilder cla
try (InputStream input = getLibraryListFile()) {
return Annotaml.create(PaperLibraries.class, Objects.requireNonNull(input)).get().libraries;
} catch (Exception e) {
e.printStackTrace();
classpathBuilder.getContext().getLogger().error("Failed to resolve libraries", e);
}
return List.of();
}
Expand Down

0 comments on commit 52f9999

Please sign in to comment.