-
Notifications
You must be signed in to change notification settings - Fork 279
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
Conversation
// thread count | ||
int threadCount = 0; | ||
Set<Thread> threads = Thread.getAllStackTraces().keySet(); | ||
for (Thread thread : threads) { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
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 😛
Subcommands are now looked up through an ImmutableSortedMap that ensures English case folding.