add .java

*cough cough* @ZeroEpoch1969 check PR's before merging them, also the formatting is off
This commit is contained in:
Lemon 2018-05-26 13:56:19 +05:00 committed by GitHub
parent bdae2b7b54
commit 6e7297e48f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,15 +18,17 @@ public class Command_cookie extends FreedomCommand
{ {
final StringBuilder output = new StringBuilder(); final StringBuilder output = new StringBuilder();
for (final String word : COOKIE_LYRICS.split(" ")) { for (final String word : COOKIE_LYRICS.split(" "))
{
output.append(FUtil.randomChatColor()).append(word).append(" "); output.append(FUtil.randomChatColor()).append(word).append(" ");
} }
ItemStack heldItem = new ItemStack(Material.COOKIE, 1); ItemStack heldItem = new ItemStack(Material.COOKIE, 1);
for (final Player player : this.server.getOnlinePlayers()) for (final Player player : server.getOnlinePlayers())
{ {
final int firstEmpty = player.getInventory().firstEmpty(); final int firstEmpty = player.getInventory().firstEmpty();
if (firstEmpty >= 0) { if (firstEmpty >= 0)
{
player.getInventory().setItem(firstEmpty, heldItem); player.getInventory().setItem(firstEmpty, heldItem);
} }
} }