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

GlowServer.getProfile without async lookup #891

Merged
merged 4 commits into from Mar 30, 2018

Conversation

Projects
None yet
3 participants
@Pr0methean
Contributor

Pr0methean commented Mar 29, 2018

Fixes #881. Only the new overload that takes a boolean parameter will trigger a UUID lookup from the Mojang server; to maintain compatibility with existing behavior, the existing code now uses that overload and sets the parameter to true.

Pr0methean added some commits Mar 29, 2018

@Pr0methean Pr0methean requested a review from mastercoms Mar 29, 2018

@Minecrell

This comment has been minimized.

Contributor

Minecrell commented Mar 29, 2018

Looks fine, but you need to remove the null check in the GlowPlayerProfile constructor to make it work properly:

10:41:59 [SEVERE] Could not pass event StatusEvent to ServerListPlus v3.4.9-SNAPSHOT
org.bukkit.event.EventException
        ...
Caused by: java.lang.NullPointerException: uuid must not be null
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
        at net.glowstone.entity.meta.profile.GlowPlayerProfile.<init>(GlowPlayerProfile.java:93)
        at net.glowstone.entity.meta.profile.GlowPlayerProfile.<init>(GlowPlayerProfile.java:60)
        at net.glowstone.GlowServer.createProfile(GlowServer.java:1760)
        at net.glowstone.GlowServer.createProfile(GlowServer.java:1748)
        at net.glowstone.GlowServer.createProfile(GlowServer.java:1743)
        at net.glowstone.GlowServer.createProfile(GlowServer.java:215)
        at net.minecrell.serverlistplus.bukkit.handlers.PaperEventHandler.handlePaperServerListPing(PaperEventHandler.java:101)
        at net.minecrell.serverlistplus.bukkit.handlers.PaperEventHandler.onServerListPing(PaperEventHandler.java:28)
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor3.execute(Unknown Source)
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70)
        ... 45 more
@Pr0methean

This comment has been minimized.

Contributor

Pr0methean commented Mar 30, 2018

@Minecrell Done.

@Minecrell

This comment has been minimized.

Contributor

Minecrell commented Mar 30, 2018

Working fine now, thanks for making the changes.

@mastercoms mastercoms merged commit 7f0f030 into GlowstoneMC:dev Mar 30, 2018

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment