Skip to content

Commit 1415cc4

Browse files
committed
Remove reference to current search object when search ends
1 parent 52b6179 commit 1415cc4

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/de/themoep/entitydetection/EntityDetection.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public boolean stopSearch(String stopper) {
8080
return false;
8181
}
8282
currentSearch.stop(stopper);
83+
clearCurrentSearch();
8384
return true;
8485
}
8586

@@ -92,6 +93,10 @@ public void addResult(SearchResult<?> result) {
9293
}
9394
}
9495

96+
public void clearCurrentSearch() {
97+
currentSearch = null;
98+
}
99+
95100
public EntitySearch getCurrentSearch() {
96101
return currentSearch;
97102
}

src/main/java/de/themoep/entitydetection/searcher/EntitySearch.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,6 @@ public void run() {
173173
plugin.addResult(result);
174174
plugin.send(owner, result);
175175
running = false;
176+
plugin.clearCurrentSearch();
176177
}
177178
}

0 commit comments

Comments
 (0)