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

Optimize player / user iteration. #733

Closed
wants to merge 1 commit into from
Closed

Optimize player / user iteration. #733

wants to merge 1 commit into from

Conversation

md-5
Copy link
Member

@md-5 md-5 commented Jul 12, 2014

  • Add a method for backwards compatability with unmapped code.
  • Convert all getOnlinePlayers() calls to use this method, part of the Essential interface
  • Add a new method getOnlineUsers() Ljava/lang/Iterable;
  • Convert appropriate calls to use this method
  • Update Bukkit to #1945
  • Update CraftBukkit to #3103

@md-5
Copy link
Member Author

md-5 commented Jul 15, 2014

@khobbits I missed any additional feedback you may/may not have left on IRC after my changes, if you could copy it / discuss here that would be great.

* Add a method for backwards compatability with unmapped code.
* Convert all getOnlinePlayers() calls to use this method, part of the IEssentials interface
* Add a new method getOnlineUsers() Ljava/lang/Iterable;
* Convert appropriate calls to use this method
* Update Bukkit to #1945
* Update CraftBukkit to #3103
@khobbits
Copy link
Member

The biggest issue with doing something like that is it pollutes the code base with 'temp' hacks.
We need to remember to go and clean it up otherwise the code base becomes a bigger mess.

I'm not sure if that is a road we want to continue down, at least not to this extent.

@md-5
Copy link
Member Author

md-5 commented Jul 15, 2014

@khobbits the only temp hack' is maintaining support for older Bukkit releases. If you are really opposed to that we can just delete the backwards compatibility and force a version bump.

@md-5
Copy link
Member Author

md-5 commented Jul 15, 2014

However that being said the current code is pretty non intrusive, its not like it uses any NMS, rather just calls a method of the API not present at compile time.

@khobbits
Copy link
Member

I'm just not sure I like that sort of backwards workaround bloat.

A little while ago I started adding a few minor things like this to allow some of the more recent versions of Essentials to 'work' with modded servers running against older Bukkit versions, where they would error but not cause the server to stop working.

While I managed to fix them, it made me really hesitant to work on new code that I know will break compatibility with older versions.

In-fact that reminds me, I can probably remove most of those since the UUID probably broke those.

@khobbits
Copy link
Member

merged.

@khobbits khobbits closed this Jul 19, 2014
@ementalo ementalo deleted the md_5 branch May 18, 2015 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants