Remove FawePlayer and API modifications

This commit is contained in:
MattBDev
2019-09-13 23:05:16 -04:00
parent c65e06cb1b
commit 14ed3f1d9c
105 changed files with 1614 additions and 2407 deletions

View File

@ -30,7 +30,7 @@ import java.util.zip.GZIPOutputStream;
* Check out https://bStats.org/ to learn more about bStats!
*/
@SuppressWarnings({"WeakerAccess", "unused"})
public class MetricsLite {
public class Metrics {
static {
// You can use the property to disable the check in your test environment
@ -40,7 +40,7 @@ public class MetricsLite {
new byte[]{'o', 'r', 'g', '.', 'b', 's', 't', 'a', 't', 's', '.', 'b', 'u', 'k', 'k', 'i', 't'});
final String examplePackage = defaultPackage;
// We want to make sure nobody just copy & pastes the example and use the wrong package names
if (MetricsLite.class.getPackage().getName().equals(defaultPackage) || MetricsLite.class.getPackage().getName().equals(examplePackage)) {
if (Metrics.class.getPackage().getName().equals(defaultPackage) || Metrics.class.getPackage().getName().equals(examplePackage)) {
throw new IllegalStateException("bStats Metrics class has not been relocated correctly!");
}
}
@ -75,7 +75,7 @@ public class MetricsLite {
*
* @param plugin The plugin which stats should be submitted.
*/
public MetricsLite(Plugin plugin) {
public Metrics(Plugin plugin) {
if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null!");
}
@ -129,7 +129,7 @@ public class MetricsLite {
} catch (NoSuchFieldException ignored) { }
}
// Register our service
Bukkit.getServicesManager().register(MetricsLite.class, this, plugin, ServicePriority.Normal);
Bukkit.getServicesManager().register(Metrics.class, this, plugin, ServicePriority.Normal);
if (!found) {
// We are the first!
startSubmitting();
@ -364,4 +364,4 @@ public class MetricsLite {
return outputStream.toByteArray();
}
}
}