mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Only check update if premium. Add bstats bars for premium vs not.
This commit is contained in:
parent
92ef0d723b
commit
336f27f078
@ -190,7 +190,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
if (PremiumVerification.isPremium() && Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
||||||
new UpdateUtility(this).updateChecker();
|
new UpdateUtility(this).updateChecker();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -717,6 +717,17 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}));
|
}));
|
||||||
|
metrics.addCustomChart(new Metrics.SimpleBarChart("premium", () -> {
|
||||||
|
final Map<String, Integer> map = new HashMap<>();
|
||||||
|
if(PremiumVerification.isPremium()) {
|
||||||
|
map.put("Premium", 1);
|
||||||
|
map.put("Non-Premium", 0);
|
||||||
|
} else {
|
||||||
|
map.put("Premium", 0);
|
||||||
|
map.put("Non-Premium", 1);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public ChunkManager initChunkManager() {
|
@Override public ChunkManager initChunkManager() {
|
||||||
|
@ -98,6 +98,7 @@ import com.plotsquared.core.plot.PlotId;
|
|||||||
import com.plotsquared.core.plot.PlotInventory;
|
import com.plotsquared.core.plot.PlotInventory;
|
||||||
import com.plotsquared.core.plot.message.PlotMessage;
|
import com.plotsquared.core.plot.message.PlotMessage;
|
||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
|
import com.plotsquared.core.util.PremiumVerification;
|
||||||
import com.plotsquared.core.util.StringWrapper;
|
import com.plotsquared.core.util.StringWrapper;
|
||||||
import com.plotsquared.core.util.EntityUtil;
|
import com.plotsquared.core.util.EntityUtil;
|
||||||
import com.plotsquared.core.util.MainUtil;
|
import com.plotsquared.core.util.MainUtil;
|
||||||
@ -660,7 +661,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}, 20);
|
}, 20);
|
||||||
|
|
||||||
if (pp.hasPermission(Captions.PERMISSION_ADMIN_UPDATE_NOTIFICATION.getTranslated())
|
if (pp.hasPermission(Captions.PERMISSION_ADMIN_UPDATE_NOTIFICATION.getTranslated())
|
||||||
&& Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
&& Settings.Enabled_Components.UPDATE_NOTIFICATIONS && PremiumVerification.isPremium()) {
|
||||||
try {
|
try {
|
||||||
HttpsURLConnection connection = (HttpsURLConnection) new URL(
|
HttpsURLConnection connection = (HttpsURLConnection) new URL(
|
||||||
"https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
|
"https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506")
|
||||||
|
Loading…
Reference in New Issue
Block a user