Skip to content

i18nize and refactor GlowstoneCommand #1026

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

Merged
merged 4 commits into from
Mar 5, 2019
Merged

i18nize and refactor GlowstoneCommand #1026

merged 4 commits into from
Mar 5, 2019

Conversation

Pr0methean
Copy link
Contributor

Subcommands are now looked up through an ImmutableSortedMap that ensures English case folding.

// thread count
int threadCount = 0;
Set<Thread> threads = Thread.getAllStackTraces().keySet();
for (Thread thread : threads) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you refactor this to use a Stream?

new LocalizedStringImpl("glowstone.about", b).send(sender);
LocalizedStringImpl t
= new LocalizedStringImpl("glowstone.about._template", b);
sendBullet(sender, t, b, "glowstone.about.brand", Bukkit.getName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename the b and t variables to be more descriptive?

Copy link
Contributor Author

@Pr0methean Pr0methean Mar 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into how much longer they can be while still fitting most of the sendBullet calls on one line each.

case PROPERTY:
return StringUtil
.copyPartialMatches(args[1],
System.getProperties().stringPropertyNames(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going on here with all the whitespace? It's hardly readable 😛

@aramperes aramperes merged commit f8938f8 into dev Mar 5, 2019
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

Successfully merging this pull request may close these issues.

2 participants