Code cleanup

Reorganised imports
Removed redundant qualifiers
This commit is contained in:
bushtail
2023-08-19 15:07:23 +00:00
committed by Ryan
parent 0eca9521bc
commit 1b4e0aafaa
346 changed files with 2871 additions and 2886 deletions
@@ -45,8 +45,8 @@ class AIRepository {
@JvmStatic fun clearAllBots() {
PulseRepository.toList().forEach { (_, it) ->
it.stop();
it.botScript.bot.clear();
it.stop()
it.botScript.bot.clear()
AIPlayer.deregister((it.botScript.bot as AIPlayer).uid)
}
}
+1 -1
View File
@@ -192,7 +192,7 @@ class ScriptAPI(private val bot: Player) {
return false
if (acceptedPredicate != null) {
return acceptedPredicate(e) && !Pathfinder.find(bot, e).isMoveNear;
return acceptedPredicate(e) && !Pathfinder.find(bot, e).isMoveNear
} else {
val name = e?.name
return (acceptedNames?.stream()?.anyMatch({ s -> s.equals(name, true) }) ?: true && !Pathfinder.find(bot, e).isMoveNear)