generated from TobiasDeBruijn/BaseBukkitPlugin
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff1c8c6
commit ebe9792
Showing
12 changed files
with
138 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pluginVersion = 1.7.7 | ||
pluginVersion = 1.7.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,5 @@ | |
"servers": [ | ||
"https://skinfixer.k8s.array21.dev" | ||
], | ||
"messages": [ | ||
{ | ||
"text": "Hi Mom!" | ||
} | ||
] | ||
"messages": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/dev/array21/skinfixer/apis/RemotePluginInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dev.array21.skinfixer.apis; | ||
|
||
import com.google.gson.Gson; | ||
import dev.array21.httplib.Http; | ||
import dev.array21.skinfixer.SkinFixer; | ||
import dev.array21.skinfixer.apis.gson.RemoteInfoManifest; | ||
import dev.array21.skinfixer.util.Utils; | ||
import org.bukkit.Bukkit; | ||
|
||
import java.io.IOException; | ||
|
||
public class RemotePluginInfo { | ||
|
||
public static RemoteInfoManifest getManifest(SkinFixer plugin) { | ||
Http.ResponseObject response; | ||
try { | ||
response = new Http().makeRequest(Http.RequestMethod.GET, plugin.getConfigManifest().remotePluginInfoUrl, null, null, null, null); | ||
} catch (IOException e) { | ||
SkinFixer.logWarn("Failed to retrieve remote plugin info. This is fatal"); | ||
SkinFixer.logWarn(Utils.getStackTrace(e)); | ||
Bukkit.getPluginManager().disablePlugin(plugin); | ||
return null; | ||
} | ||
|
||
return new Gson().fromJson(response.getMessage(), RemoteInfoManifest.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/dev/array21/skinfixer/apis/gson/RemoteInfoManifest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package dev.array21.skinfixer.apis.gson; | ||
|
||
public class RemoteInfoManifest { | ||
|
||
public String[] servers; | ||
|
||
public Message[] messages; | ||
|
||
public static class Message { | ||
public String text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters