Removed references to spigotmc. eco will now check polymart for updates

This commit is contained in:
Auxilor
2021-09-19 11:11:01 +01:00
parent 396f4dac44
commit fcc7f82b38
3 changed files with 13 additions and 12 deletions

View File

@@ -16,7 +16,7 @@
# Information for development
## Javadoc
The 6.0.0 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.0.0/javadoc/)
The 6.8.0 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.8.0/javadoc/)
## Plugin Information
@@ -31,7 +31,6 @@ depend:
eco is available from any of these places:
- [GitHub](https://github.com/Auxilor/eco/releases)
- [Spigot](https://www.spigotmc.org/resources/eco.87955/)
- [Polymart](https://polymart.org/resource/eco.773)
- [Build it locally](https://github.com/Auxilor/eco#build-locally).
@@ -72,7 +71,7 @@ Maven:
</dependency>
```
Replace `Tag` with a release tag for eco, eg `6.0.0`.
Replace `Tag` with a release tag for eco, eg `6.8.0`.
## Build locally:

View File

@@ -54,7 +54,7 @@ import java.util.stream.Collectors;
@SuppressWarnings("unused")
public abstract class EcoPlugin extends JavaPlugin {
/**
* The spigot resource ID of the plugin.
* The polymart resource ID of the plugin.
*/
@Getter
private final int resourceId;
@@ -169,14 +169,14 @@ public abstract class EcoPlugin extends JavaPlugin {
private final ProxyFactory proxyFactory;
/**
* Create a new plugin without a specified color, proxy support, spigot, or bStats.
* Create a new plugin without a specified color, proxy support, polymart, or bStats.
*/
protected EcoPlugin() {
this("&f");
}
/**
* Create a new plugin without proxy support, spigot, or bStats.
* Create a new plugin without proxy support, polymart, or bStats.
*
* @param color The color.
*/
@@ -186,7 +186,7 @@ public abstract class EcoPlugin extends JavaPlugin {
/**
* Create a new plugin unlinked to spigot and bStats.
* Create a new plugin unlinked to polymart and bStats.
*
* @param proxyPackage The package where proxy implementations are stored.
* @param color The color of the plugin (used in messages, using standard formatting)
@@ -199,7 +199,7 @@ public abstract class EcoPlugin extends JavaPlugin {
/**
* Create a new plugin without proxy or extension support.
*
* @param resourceId The spigot resource ID for the plugin.
* @param resourceId The polymart resource ID for the plugin.
* @param bStatsId The bStats resource ID for the plugin.
* @param color The color of the plugin (used in messages, using standard formatting)
*/
@@ -212,7 +212,7 @@ public abstract class EcoPlugin extends JavaPlugin {
/**
* Create a new plugin without proxy support.
*
* @param resourceId The spigot resource ID for the plugin.
* @param resourceId The polymart resource ID for the plugin.
* @param bStatsId The bStats resource ID for the plugin.
* @param color The color of the plugin (used in messages, using standard formatting)
* @param supportingExtensions If the plugin supports extensions.
@@ -227,7 +227,7 @@ public abstract class EcoPlugin extends JavaPlugin {
/**
* Create a new plugin without extension support.
*
* @param resourceId The spigot resource ID for the plugin.
* @param resourceId The polymart resource ID for the plugin.
* @param bStatsId The bStats resource ID for the plugin.
* @param proxyPackage The package where proxy implementations are stored.
* @param color The color of the plugin (used in messages, using standard formatting)
@@ -242,7 +242,7 @@ public abstract class EcoPlugin extends JavaPlugin {
/**
* Create a new plugin.
*
* @param resourceId The spigot resource ID for the plugin.
* @param resourceId The polymart resource ID for the plugin.
* @param bStatsId The bStats resource ID for the plugin.
* @param proxyPackage The package where proxy implementations are stored.
* @param color The color of the plugin (used in messages, using standard formatting)

View File

@@ -31,7 +31,9 @@ public class UpdateChecker extends PluginDependent<EcoPlugin> {
public void getVersion(@NotNull final Consumer<? super String> consumer) {
this.getPlugin().getScheduler().runAsync(() -> {
try {
InputStream inputStream = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.getPlugin().getResourceId()).openStream();
InputStream inputStream = new URL(
"https://api.polymart.org/v1/getResourceInfoSimple?key=version&resource_id=" + this.getPlugin().getResourceId()
).openStream();
Scanner scanner = new Scanner(inputStream);
if (scanner.hasNext()) {