Removed references to spigotmc. eco will now check polymart for updates
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
# Information for development
|
# Information for development
|
||||||
|
|
||||||
## Javadoc
|
## 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
|
## Plugin Information
|
||||||
|
|
||||||
@@ -31,7 +31,6 @@ depend:
|
|||||||
eco is available from any of these places:
|
eco is available from any of these places:
|
||||||
|
|
||||||
- [GitHub](https://github.com/Auxilor/eco/releases)
|
- [GitHub](https://github.com/Auxilor/eco/releases)
|
||||||
- [Spigot](https://www.spigotmc.org/resources/eco.87955/)
|
|
||||||
- [Polymart](https://polymart.org/resource/eco.773)
|
- [Polymart](https://polymart.org/resource/eco.773)
|
||||||
- [Build it locally](https://github.com/Auxilor/eco#build-locally).
|
- [Build it locally](https://github.com/Auxilor/eco#build-locally).
|
||||||
|
|
||||||
@@ -72,7 +71,7 @@ Maven:
|
|||||||
</dependency>
|
</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:
|
## Build locally:
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import java.util.stream.Collectors;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public abstract class EcoPlugin extends JavaPlugin {
|
public abstract class EcoPlugin extends JavaPlugin {
|
||||||
/**
|
/**
|
||||||
* The spigot resource ID of the plugin.
|
* The polymart resource ID of the plugin.
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
private final int resourceId;
|
private final int resourceId;
|
||||||
@@ -169,14 +169,14 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
private final ProxyFactory proxyFactory;
|
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() {
|
protected EcoPlugin() {
|
||||||
this("&f");
|
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.
|
* @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 proxyPackage The package where proxy implementations are stored.
|
||||||
* @param color The color of the plugin (used in messages, using standard formatting)
|
* @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.
|
* 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 bStatsId The bStats resource ID for the plugin.
|
||||||
* @param color The color of the plugin (used in messages, using standard formatting)
|
* @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.
|
* 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 bStatsId The bStats resource ID for the plugin.
|
||||||
* @param color The color of the plugin (used in messages, using standard formatting)
|
* @param color The color of the plugin (used in messages, using standard formatting)
|
||||||
* @param supportingExtensions If the plugin supports extensions.
|
* @param supportingExtensions If the plugin supports extensions.
|
||||||
@@ -227,7 +227,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
/**
|
/**
|
||||||
* Create a new plugin without extension support.
|
* 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 bStatsId The bStats resource ID for the plugin.
|
||||||
* @param proxyPackage The package where proxy implementations are stored.
|
* @param proxyPackage The package where proxy implementations are stored.
|
||||||
* @param color The color of the plugin (used in messages, using standard formatting)
|
* @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.
|
* 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 bStatsId The bStats resource ID for the plugin.
|
||||||
* @param proxyPackage The package where proxy implementations are stored.
|
* @param proxyPackage The package where proxy implementations are stored.
|
||||||
* @param color The color of the plugin (used in messages, using standard formatting)
|
* @param color The color of the plugin (used in messages, using standard formatting)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ public class UpdateChecker extends PluginDependent<EcoPlugin> {
|
|||||||
public void getVersion(@NotNull final Consumer<? super String> consumer) {
|
public void getVersion(@NotNull final Consumer<? super String> consumer) {
|
||||||
this.getPlugin().getScheduler().runAsync(() -> {
|
this.getPlugin().getScheduler().runAsync(() -> {
|
||||||
try {
|
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);
|
Scanner scanner = new Scanner(inputStream);
|
||||||
|
|
||||||
if (scanner.hasNext()) {
|
if (scanner.hasNext()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user