Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics by Hidendra is outdated - getOnlinePlayers deprecated #153

Open
oddare opened this issue Oct 29, 2016 · 3 comments
Open

Metrics by Hidendra is outdated - getOnlinePlayers deprecated #153

oddare opened this issue Oct 29, 2016 · 3 comments

Comments

@oddare
Copy link

oddare commented Oct 29, 2016

[06:35:47] [Craft Scheduler Thread - 50/WARN]: Exception in thread "Craft Scheduler Thread - 50" [06:35:47] [Craft Scheduler Thread - 50/WARN]: org.apache.commons.lang.UnhandledException: Plugin ecoCreature v0.3.2-SNAPSHOT-b475 generated an exception while executing task 16 at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player; at se.crafted.chrisb.mcstats.Metrics.postPlugin(Metrics.java:335) at se.crafted.chrisb.mcstats.Metrics.access$400(Metrics.java:57) at se.crafted.chrisb.mcstats.Metrics$1.run(Metrics.java:223) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 more

I'm going over all my plugins to weed out errors and the likes, and this is one of the more annoying one. Though it only happens every 15th, as I believe requested somewhere within the code, it is still throwing up the "WARN" and, as such, giving issues while looking through logs and the likes, if not being rather annoying in general.

I've looked around the configuration, and on the Bukkit page, but I found nothing that would tell me how I could disable it. Nor do I want to delete the "mcstats" folder within the plugin in case that might give more WARNings.

Any way to disable it? Or maybe consider deprecating the metrics, as many other developers are doing?

The main issue here is the usage of the "getOnlinePlayers" which was deprecated somewhere around 1.9.

@mung3r
Copy link
Owner

mung3r commented Oct 30, 2016

I haven't been very good about updating bukkitdev with the latest version. However, you are welcome to download the latest from here - which supports 1.10.

@oddare
Copy link
Author

oddare commented Oct 30, 2016

Uh, I did a stupid there and didn't list the version.

I have that version, the #475, but the issue is that as far as I'm aware, you're using Hidendra's mcstats (Metrics) hook (?), which hasn't been updated since Spigot/Bukkit/Everyone deprecated "getOnlinePlayers". It still works, but it gives the issue I just listed every time it is run.

And since it appears as though Hidendra is no longer updating it, multiple developers have removed it, or are telling the users to remove it if they can. For your plugin however, it appears as though it doesn't look at my "OptOut" for the plugin, nor is it asking about it itself.

@oddare oddare changed the title Metrics are outdated Metrics by Hidendra are outdated - getOnlinePlayers deprecated Nov 1, 2016
@oddare oddare changed the title Metrics by Hidendra are outdated - getOnlinePlayers deprecated Metrics by Hidendra is outdated - getOnlinePlayers deprecated Nov 1, 2016
@mung3r
Copy link
Owner

mung3r commented Nov 7, 2016

I'll work on getting it removed. Thanks for the bug report.

mung3r added a commit that referenced this issue Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants