mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 06:28:49 +00:00
Minor formatting tweaks
This commit is contained in:
1 parent
c1f2b2bcaa
commit
52f9999991
5 files changed
+6
-5
No files matched your search
@@ -164,7 +164,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
|||||||
initialize("hooks", (plugin) -> {
|
initialize("hooks", (plugin) -> {
|
||||||
this.registerHooks();
|
this.registerHooks();
|
||||||
|
|
||||||
if (hooks.size() > 0) {
|
if (!hooks.isEmpty()) {
|
||||||
hooks.forEach(hook -> {
|
hooks.forEach(hook -> {
|
||||||
try {
|
try {
|
||||||
hook.initialize();
|
hook.initialize();
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class BrigadierUtil {
|
|||||||
@NotNull org.bukkit.command.Command bukkitCommand,
|
@NotNull org.bukkit.command.Command bukkitCommand,
|
||||||
@NotNull Command command) {
|
@NotNull Command command) {
|
||||||
final InputStream commodoreFile = plugin.getResource(
|
final InputStream commodoreFile = plugin.getResource(
|
||||||
"commodore/" + bukkitCommand.getName() + ".commodore"
|
String.format("commodore/%s.commodore", bukkitCommand.getName())
|
||||||
);
|
);
|
||||||
if (commodoreFile == null) {
|
if (commodoreFile == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public abstract class Command extends Node {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public final String getUsage() {
|
public final String getUsage() {
|
||||||
return "/" + getName() + " " + getRawUsage();
|
return String.format("/%s %s", getName(), getRawUsage());
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void addAdditionalPermissions(@NotNull Map<String, Boolean> permissions) {
|
public final void addAdditionalPermissions(@NotNull Map<String, Boolean> permissions) {
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public class PaperHuskHomes extends BukkitHuskHomes {
|
public class PaperHuskHomes extends BukkitHuskHomes {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected @NotNull EventListener registerListener() {
|
@NotNull
|
||||||
|
protected EventListener registerListener() {
|
||||||
return new PaperEventListener(this);
|
return new PaperEventListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class PaperHuskHomesLoader implements PluginLoader {
|
|||||||
try (InputStream input = getLibraryListFile()) {
|
try (InputStream input = getLibraryListFile()) {
|
||||||
return Annotaml.create(PaperLibraries.class, Objects.requireNonNull(input)).get().libraries;
|
return Annotaml.create(PaperLibraries.class, Objects.requireNonNull(input)).get().libraries;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
classpathBuilder.getContext().getLogger().error("Failed to resolve libraries", e);
|
||||||
}
|
}
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user