mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-25 13:28:58 +02:00
Remove special message for error 403
it was a firewall config error at my end after all lol woops
This commit is contained in:
@@ -85,11 +85,7 @@ public class ApplyEditsCommand extends SingleCommand {
|
|||||||
try {
|
try {
|
||||||
data = WebEditor.readDataFromBytebin(plugin.getBytebin(), code);
|
data = WebEditor.readDataFromBytebin(plugin.getBytebin(), code);
|
||||||
} catch (UnsuccessfulRequestException e) {
|
} catch (UnsuccessfulRequestException e) {
|
||||||
if (e.getResponse().code() == 403) {
|
|
||||||
Message.EDITOR_HTTP_FORBIDDEN_FAILURE.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||||
}
|
|
||||||
return CommandResult.STATE_ERROR;
|
return CommandResult.STATE_ERROR;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||||
|
@@ -98,11 +98,7 @@ public class TreeCommand extends SingleCommand {
|
|||||||
try {
|
try {
|
||||||
id = view.uploadPasteData(plugin.getBytebin(), sender, user, permissionData);
|
id = view.uploadPasteData(plugin.getBytebin(), sender, user, permissionData);
|
||||||
} catch (UnsuccessfulRequestException e) {
|
} catch (UnsuccessfulRequestException e) {
|
||||||
if (e.getResponse().code() == 403) {
|
|
||||||
Message.GENERIC_HTTP_FORBIDDEN_FAILURE.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||||
}
|
|
||||||
return CommandResult.STATE_ERROR;
|
return CommandResult.STATE_ERROR;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||||
|
@@ -119,11 +119,7 @@ public class VerboseCommand extends SingleCommand {
|
|||||||
try {
|
try {
|
||||||
id = listener.uploadPasteData(plugin.getBytebin());
|
id = listener.uploadPasteData(plugin.getBytebin());
|
||||||
} catch (UnsuccessfulRequestException e) {
|
} catch (UnsuccessfulRequestException e) {
|
||||||
if (e.getResponse().code() == 403) {
|
|
||||||
Message.GENERIC_HTTP_FORBIDDEN_FAILURE.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||||
}
|
|
||||||
return CommandResult.STATE_ERROR;
|
return CommandResult.STATE_ERROR;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||||
|
@@ -143,7 +143,6 @@ public enum Message {
|
|||||||
TREE_URL("&aPermission tree URL:", true),
|
TREE_URL("&aPermission tree URL:", true),
|
||||||
|
|
||||||
GENERIC_HTTP_REQUEST_FAILURE("&cUnable to communicate with the web app. (response code &4{}&c, message='{}')", true),
|
GENERIC_HTTP_REQUEST_FAILURE("&cUnable to communicate with the web app. (response code &4{}&c, message='{}')", true),
|
||||||
GENERIC_HTTP_FORBIDDEN_FAILURE("&cUnable to communicate with the web app - '&4forbidden access&c' error &4403&3. You network provider or firewall (antivirus / content filter?) may have blocked access to the resource.", true),
|
|
||||||
GENERIC_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the web app. Check the console for errors.", true),
|
GENERIC_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the web app. Check the console for errors.", true),
|
||||||
|
|
||||||
SEARCH_SEARCHING("&aSearching for users and groups with &bpermissions {}&a...", true),
|
SEARCH_SEARCHING("&aSearching for users and groups with &bpermissions {}&a...", true),
|
||||||
@@ -170,7 +169,6 @@ public enum Message {
|
|||||||
EDITOR_URL("&aClick the link below to open the editor:", true),
|
EDITOR_URL("&aClick the link below to open the editor:", true),
|
||||||
|
|
||||||
EDITOR_HTTP_REQUEST_FAILURE("&cUnable to communicate with the editor. (response code &4{}&c, message='{}')", true),
|
EDITOR_HTTP_REQUEST_FAILURE("&cUnable to communicate with the editor. (response code &4{}&c, message='{}')", true),
|
||||||
EDITOR_HTTP_FORBIDDEN_FAILURE("&cUnable to communicate with the editor - '&4forbidden access&c' error &4403&3. You network provider or firewall (antivirus / content filter?) may have blocked access to the resource.", true),
|
|
||||||
EDITOR_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the editor. Check the console for errors.", true),
|
EDITOR_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the editor. Check the console for errors.", true),
|
||||||
|
|
||||||
CHECK_RESULT("&aPermission check result on user &b{}&a for permission &b{}&a: &f{}", true),
|
CHECK_RESULT("&aPermission check result on user &b{}&a for permission &b{}&a: &f{}", true),
|
||||||
|
@@ -137,11 +137,7 @@ public final class WebEditor {
|
|||||||
try {
|
try {
|
||||||
pasteId = plugin.getBytebin().postContent(bytesOut.toByteArray(), AbstractHttpClient.JSON_TYPE, false).key();
|
pasteId = plugin.getBytebin().postContent(bytesOut.toByteArray(), AbstractHttpClient.JSON_TYPE, false).key();
|
||||||
} catch (UnsuccessfulRequestException e) {
|
} catch (UnsuccessfulRequestException e) {
|
||||||
if (e.getResponse().code() == 403) {
|
|
||||||
Message.EDITOR_HTTP_FORBIDDEN_FAILURE.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||||
}
|
|
||||||
return CommandResult.STATE_ERROR;
|
return CommandResult.STATE_ERROR;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||||
|
Reference in New Issue
Block a user