diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/BitlyURLShortener.java b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/BitlyURLShortener.java index 882c3790..90472344 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/BitlyURLShortener.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/BitlyURLShortener.java @@ -23,7 +23,7 @@ class BitlyURLShortener extends URLShortener { * {@inheritDoc} */ @Override - protected String encodeData(String data) { + String encodeData(String data) { JSONObject json = new JSONObject(); json.put("domain", "j.mp"); json.put("long_url", data); @@ -34,7 +34,7 @@ class BitlyURLShortener extends URLShortener { * {@inheritDoc} */ @Override - protected String encodeData(Map data) { + String encodeData(Map data) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/GitHubPasteService.java b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/GitHubPasteService.java index 0370a7ca..32aeaf53 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/GitHubPasteService.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/GitHubPasteService.java @@ -21,14 +21,14 @@ public class GitHubPasteService extends PasteService { } @Override - public String encodeData(String data) { + String encodeData(String data) { Map mapData = new HashMap(); mapData.put("multiverse.txt", data); return this.encodeData(mapData); } @Override - public String encodeData(Map files) { + String encodeData(Map files) { JSONObject root = new JSONObject(); root.put("description", "Multiverse-Core Debug Info"); root.put("public", !this.isPrivate); diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HastebinPasteService.java b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HastebinPasteService.java index c77e1f7b..da0dcba8 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HastebinPasteService.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HastebinPasteService.java @@ -21,7 +21,7 @@ class HastebinPasteService extends PasteService { * {@inheritDoc} */ @Override - public String encodeData(String data) { + String encodeData(String data) { return data; } @@ -29,7 +29,7 @@ class HastebinPasteService extends PasteService { * {@inheritDoc} */ @Override - public String encodeData(Map data) { + String encodeData(Map data) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HttpAPIClient.java b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HttpAPIClient.java index c8c4b2bf..353565d7 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HttpAPIClient.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/HttpAPIClient.java @@ -23,7 +23,7 @@ public abstract class HttpAPIClient { /** * Types of data that can be sent. */ - protected enum ContentType { + enum ContentType { JSON, PLAINTEXT, URLENCODED @@ -53,7 +53,7 @@ public abstract class HttpAPIClient { * @param data The raw data to encode. * @return A URL-encoded string. */ - protected abstract String encodeData(String data); + abstract String encodeData(String data); /** * Encode the given Map data into a format suitable for transmission in an HTTP request. @@ -61,7 +61,7 @@ public abstract class HttpAPIClient { * @param data The raw data to encode. * @return A URL-encoded string. */ - protected abstract String encodeData(Map data); + abstract String encodeData(Map data); /** * Executes this API-Request. @@ -70,7 +70,7 @@ public abstract class HttpAPIClient { * @return The result (as text). * @throws IOException When the I/O-operation failed. */ - protected final String exec(String payload, ContentType type) throws IOException { + final String exec(String payload, ContentType type) throws IOException { BufferedReader rd = null; OutputStreamWriter wr = null; diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/PastebinPasteService.java b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/PastebinPasteService.java index 85af5a47..30c346ba 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/PastebinPasteService.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/webpaste/PastebinPasteService.java @@ -21,7 +21,7 @@ class PastebinPasteService extends PasteService { * {@inheritDoc} */ @Override - public String encodeData(String data) { + String encodeData(String data) { try { return URLEncoder.encode("api_dev_key", "UTF-8") + "=" + URLEncoder.encode("d61d68d31e8e0392b59b50b277411c71", "UTF-8") + "&" + URLEncoder.encode("api_option", "UTF-8") + "=" + URLEncoder.encode("paste", "UTF-8") + @@ -38,7 +38,7 @@ class PastebinPasteService extends PasteService { * {@inheritDoc} */ @Override - public String encodeData(Map data) { + String encodeData(Map data) { throw new UnsupportedOperationException(); }