Code cleanup
Reorganised imports Removed redundant qualifiers
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user