mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-10 20:59:35 +01:00
Check correct exception for logging it
This commit is contained in:
parent
6b98efb1e4
commit
8a17bfc000
@ -348,7 +348,7 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
|
|||||||
return true;
|
return true;
|
||||||
}).exceptionally(ex -> {
|
}).exceptionally(ex -> {
|
||||||
sendMessage(sender, "error.location");
|
sendMessage(sender, "error.location");
|
||||||
if (!(ex instanceof NotFoundException)) {
|
if (!(ex.getCause() instanceof NotFoundException)) {
|
||||||
getLogger().log(Level.SEVERE, "Error while trying to find a location!", ex);
|
getLogger().log(Level.SEVERE, "Error while trying to find a location!", ex);
|
||||||
}
|
}
|
||||||
searcher.getTargets().forEach(e -> {
|
searcher.getTargets().forEach(e -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user