Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit 1a9326c

Browse files
ExplvExplv
authored andcommitted
Minor fixes
1 parent 3e25e40 commit 1a9326c

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

osbot_manager/src/bot_parameters/configuration/Configuration.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import bot_parameters.account.OSBotAccount;
44
import bot_parameters.account.RunescapeAccount;
5+
import bot_parameters.bot.Bot;
56
import bot_parameters.interfaces.BotParameter;
67
import bot_parameters.interfaces.Copyable;
78
import bot_parameters.proxy.Proxy;
@@ -362,7 +363,7 @@ public Configuration createCopy() {
362363
return configurationCopy;
363364
}
364365

365-
public void run(final String osbotPath, final OSBotAccount osBotAccount) throws IOException {
366+
public void run(final Bot bot, final OSBotAccount osBotAccount) throws IOException {
366367

367368
File logFile = new File(logFileName);
368369

@@ -378,7 +379,7 @@ public void run(final String osbotPath, final OSBotAccount osBotAccount) throws
378379

379380
try (BufferedWriter br = new BufferedWriter(new FileWriter(logFile))) {
380381

381-
for (final List<String> command : getCommands(osbotPath, osBotAccount)) {
382+
for (final List<String> command : getCommands(bot, osBotAccount)) {
382383

383384
final ProcessBuilder processBuilder = new ProcessBuilder(command);
384385
processBuilder.redirectErrorStream(true);
@@ -443,14 +444,14 @@ public void run(final String osbotPath, final OSBotAccount osBotAccount) throws
443444
runThread.start();
444445
}
445446

446-
public List<List<String>> getCommands(final String osbotPath, final OSBotAccount osBotAccount) {
447+
public List<List<String>> getCommands(final Bot bot, final OSBotAccount osBotAccount) {
447448

448449
List<List<String>> commands = new ArrayList<>();
449450

450451
for (final Script script : scripts.get()) {
451452
List<String> command = new ArrayList<>();
452453

453-
Collections.addAll(command, "java", "-jar", osbotPath);
454+
Collections.addAll(command, bot.toParameterString().split(" "));
454455
Collections.addAll(command, osBotAccount.toParameterString().split(" "));
455456
Collections.addAll(command, this.toParameterString().split(" "));
456457
Collections.addAll(command, script.toParameterString().split(" "));

osbot_manager/src/gui/tabs/ConfigurationTab.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private void showCommand() {
196196

197197
dialog.getDialogPane().setContent(anchorPane);
198198

199-
List<List<String>> configCommands = configuration.getCommands(botSettingsTab.getBot().getOsbotPath(), botSettingsTab.getOsBotAccount());
199+
List<List<String>> configCommands = configuration.getCommands(botSettingsTab.getBot(), botSettingsTab.getOsBotAccount());
200200

201201
for (List<String> command : configCommands) {
202202
textArea.appendText(String.join(" ", command) + "\n");
@@ -211,7 +211,7 @@ private void runConfigurations(final List<Configuration> configurations) {
211211
new Thread(() -> {
212212
for (final Configuration configuration : configurations) {
213213
try {
214-
configuration.run(botSettingsTab.getBot().getOsbotPath(), botSettingsTab.getOsBotAccount());
214+
configuration.run(botSettingsTab.getBot(), botSettingsTab.getOsBotAccount());
215215
Thread.sleep(delay * 1000);
216216
} catch (InterruptedException e) {
217217
e.printStackTrace();

osbot_manager/src/main/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class Version {
1010

11-
private final static float currentVersion = 7.7f;
11+
private final static float currentVersion = 7.8f;
1212

1313
public static boolean isLatestVersion() {
1414
try {

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.7
1+
7.8

0 commit comments

Comments
 (0)