fix: Diag-Command throws exception because of invalid String#format

The dependencyVersion accidentally got put as an arg into Player#sendMessage instead of the String#format
This commit is contained in:
Christian Koop 2024-02-02 18:15:43 +01:00
parent f7e46be0d9
commit c027ab8b4c
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3

View File

@ -1,7 +1,7 @@
package com.craftaro.core.core; package com.craftaro.core.core;
import com.craftaro.core.commands.AbstractCommand;
import com.craftaro.core.SongodaCore; import com.craftaro.core.SongodaCore;
import com.craftaro.core.commands.AbstractCommand;
import com.craftaro.core.compatibility.ClassMapping; import com.craftaro.core.compatibility.ClassMapping;
import com.craftaro.core.compatibility.ServerProject; import com.craftaro.core.compatibility.ServerProject;
import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.compatibility.ServerVersion;
@ -52,11 +52,13 @@ public class SongodaCoreDiagCommand extends AbstractCommand {
sender.sendMessage("Plugins:"); sender.sendMessage("Plugins:");
for (PluginInfo plugin : SongodaCore.getPlugins()) { for (PluginInfo plugin : SongodaCore.getPlugins()) {
sender.sendMessage(String.format("%s v%s (Core v%s) (Dependency: %s)", sender.sendMessage(String.format(
"%s v%s (Core v%s) (Dependencies v%s)",
plugin.getJavaPlugin().getName(), plugin.getJavaPlugin().getName(),
plugin.getJavaPlugin().getDescription().getVersion(), plugin.getJavaPlugin().getDescription().getVersion(),
plugin.getCoreLibraryVersion()), plugin.getCoreLibraryVersion(),
plugin.getDependencyVersion()); plugin.getDependencyVersion()
));
} }
sender.sendMessage(""); sender.sendMessage("");