-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into skylab_manager
- Loading branch information
Showing
56 changed files
with
1,503 additions
and
932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/github/manolo8/darkbot/config/actions/conditions/HasQuestCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.github.manolo8.darkbot.config.actions.conditions; | ||
|
||
import com.github.manolo8.darkbot.Main; | ||
import com.github.manolo8.darkbot.config.actions.Condition; | ||
import com.github.manolo8.darkbot.config.actions.Parser; | ||
import com.github.manolo8.darkbot.config.actions.SyntaxException; | ||
import com.github.manolo8.darkbot.config.actions.ValueData; | ||
import com.github.manolo8.darkbot.config.actions.parser.ParseUtil; | ||
import eu.darkbot.api.managers.QuestAPI; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@ValueData(name = "has-quest", description = "True if it has quests", example = "has-quest()") | ||
public class HasQuestCondition implements Condition, Parser { | ||
private QuestAPI questApi; | ||
|
||
@Override | ||
public @NotNull Result get(Main main) { | ||
if (questApi == null) { | ||
this.questApi = main.pluginAPI.getAPI(QuestAPI.class); | ||
if (questApi == null) return Result.ABSTAIN; | ||
} | ||
|
||
return Result.fromBoolean(this.questApi.getDisplayedQuest() != null); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "has-quest()"; | ||
} | ||
|
||
@Override | ||
public String parse(String str) throws SyntaxException { | ||
String[] params = str.split("\\)", 2); | ||
return ParseUtil.separate(params, getClass(), ")"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/main/java/com/github/manolo8/darkbot/core/DarkBotAPI.java
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
src/main/java/com/github/manolo8/darkbot/core/DarkFlash.java
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
src/main/java/com/github/manolo8/darkbot/core/api/adapters/DarkBoatAdapter.java
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
src/main/java/com/github/manolo8/darkbot/core/api/adapters/DarkBoatHookAdapter.java
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
src/main/java/com/github/manolo8/darkbot/core/api/adapters/DarkCefAdapter.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.