mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-06 19:18:07 +01:00
Fix a bug where using the command help causes an error in standalone mode
This commit is contained in:
parent
f316bdd66e
commit
75d0efc044
@ -19,7 +19,7 @@
|
||||
|
||||
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface MinepacksPluginExtended extends MinepacksPlugin
|
||||
{
|
||||
@ -28,5 +28,5 @@ public interface MinepacksPluginExtended extends MinepacksPlugin
|
||||
*
|
||||
* @return The command manager instance. null if the plugin is running in standalone mode
|
||||
*/
|
||||
@Nullable MinepacksCommandManager getCommandManager();
|
||||
@NotNull MinepacksCommandManager getCommandManager();
|
||||
}
|
@ -38,7 +38,7 @@
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class CommandManager extends CommandExecutorWithSubCommandsGeneric<MinepacksCommand> /*if_not[STANDALONE]*/ implements MinepacksCommandManager /*end[STANDALONE]*/
|
||||
public class CommandManager extends CommandExecutorWithSubCommandsGeneric<MinepacksCommand> implements MinepacksCommandManager
|
||||
{
|
||||
private final Minepacks plugin;
|
||||
private final RegisterablePluginCommand backpackCommand;
|
||||
@ -53,7 +53,7 @@ public CommandManager(@NotNull Minepacks plugin)
|
||||
backpackCommand.setExecutor(this);
|
||||
backpackCommand.setTabCompleter(this);
|
||||
|
||||
helpFormat = plugin.getLanguage().getMessage("Commands.HelpFormat").replaceAll("\\{MainCommand\\}", "%1\\$s").replaceAll("\\{SubCommand\\}", "%2\\$s").replaceAll("\\{Parameters\\}", "%3\\$s").replaceAll("\\{Description\\}", "%4\\$s").replaceAll("suggest_command", "%5\\$s");
|
||||
helpFormat = plugin.getLanguage().getMessage("Commands.HelpFormat").replaceAll("\\{MainCommand}", "%1\\$s").replaceAll("\\{SubCommand}", "%2\\$s").replaceAll("\\{Parameters}", "%3\\$s").replaceAll("\\{Description}", "%4\\$s").replaceAll("suggest_command", "%5\\$s");
|
||||
|
||||
// Setting the help format for the marry commands as well as the no permissions and not from console message
|
||||
try
|
||||
|
@ -345,13 +345,9 @@ public void getBackpack(final @NotNull OfflinePlayer owner, final @NotNull Callb
|
||||
}
|
||||
|
||||
@Override
|
||||
public MinepacksCommandManager getCommandManager()
|
||||
public @NotNull MinepacksCommandManager getCommandManager()
|
||||
{
|
||||
/*if[STANDALONE]
|
||||
return null;
|
||||
else[STANDALONE]*/
|
||||
return commandManager;
|
||||
/*end[STANDALONE]*/
|
||||
}
|
||||
|
||||
public int getBackpackPermSize(final @NotNull Player player)
|
||||
|
Loading…
Reference in New Issue
Block a user