mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Fix inconsistencies with /tpignore, close #238
This commit is contained in:
1 parent
ca70ed4ae9
commit
febb177f6c
4 files changed
+34
-9
No files matched your search
@@ -216,7 +216,8 @@ public class RequestManager {
|
||||
boolean accepted) {
|
||||
// Check the recipient is not ignoring teleport requests
|
||||
if (isIgnoringRequests(recipient)) {
|
||||
plugin.getLocales().getLocale("error_ignoring_teleport_requests").ifPresent(recipient::sendMessage);
|
||||
plugin.getLocales().getLocale("error_ignoring_teleport_requests")
|
||||
.ifPresent(recipient::sendMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -239,14 +240,16 @@ public class RequestManager {
|
||||
public void respondToTeleportRequest(@NotNull OnlineUser recipient, boolean accepted) {
|
||||
// Check the recipient is not ignoring teleport requests
|
||||
if (isIgnoringRequests(recipient)) {
|
||||
plugin.getLocales().getLocale("error_ignoring_teleport_requests").ifPresent(recipient::sendMessage);
|
||||
plugin.getLocales().getLocale("error_ignoring_teleport_requests")
|
||||
.ifPresent(recipient::sendMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the latest request and handle the response
|
||||
final Optional<TeleportRequest> lastRequest = getLastTeleportRequest(recipient);
|
||||
if (lastRequest.isEmpty()) {
|
||||
plugin.getLocales().getLocale("error_no_teleport_requests").ifPresent(recipient::sendMessage);
|
||||
plugin.getLocales().getLocale("error_no_teleport_requests")
|
||||
.ifPresent(recipient::sendMessage);
|
||||
return;
|
||||
}
|
||||
handleRequestResponse(lastRequest.get(), recipient, accepted);
|
||||
|
||||
Reference in new issue
Block a user