Skip to content

Commit

Permalink
prevent exception during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooy1 committed Sep 5, 2021
1 parent 0cb1c62 commit 8065087
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.mooy1</groupId>
<artifactId>InfinityLib</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.github.mooy1.infinitylib.commands;

import java.util.List;
import java.util.Objects;

import javax.annotation.ParametersAreNonnullByDefault;

Expand All @@ -18,10 +17,11 @@ final class InfoCommand extends SubCommand {

InfoCommand(SlimefunAddon addon) {
super("info", "Gives addon and slimefun version and discord links");
Slimefun slimefun = Slimefun.instance();
message = new String[] {
"",
ChatColors.color("&b" + addon.getName() + " Info"),
ChatColors.color("&bSlimefun Version: &7" + Objects.requireNonNull(Slimefun.instance()).getPluginVersion()),
ChatColors.color("&bSlimefun Version: &7" + (slimefun == null ? "null" : slimefun.getPluginVersion())),
ChatColors.color("&bSlimefun Discord: &7Discord.gg/slimefun"),
ChatColors.color("&bAddon Version: &7" + addon.getPluginVersion()),
ChatColors.color("&bAddon Community: &7Discord.gg/SqD3gg5SAU"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AbstractAddon(String githubUserName, String githubRepo, String autoUpdate
/**
* Addon Testing Constructor
*/
protected AbstractAddon(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file,
public AbstractAddon(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file,
String githubUserName, String githubRepo, String autoUpdateBranch, String autoUpdateKey) {
this(loader, description, dataFolder, file, githubUserName, githubRepo, autoUpdateBranch, autoUpdateKey, Environment.TESTING);
}
Expand Down

0 comments on commit 8065087

Please sign in to comment.