add a usage to cookie (#104)

This commit is contained in:
Telesphoreo 2018-07-27 14:54:37 -07:00 committed by Seth
parent f8b5078f84
commit ed9200689c
2 changed files with 10 additions and 10 deletions

View file

@ -1,7 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
@ -9,13 +9,14 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.Arrays;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "For those who have no friends", usage = "/<command>")
public class Command_cookie extends FreedomCommand
{
public static final String COOKIE_LYRICS = "Imagine that you have zero cookies and you divide them evenly among zero friends. How many cookies does each person get? See, it doesn't " +
"seem to make sense, and Cookie Monster is sad there are no cookies, and you are sad you have no friends.";
public static final String COOKIE_LYRICS = "Imagine that you have zero cookies and you split them evenly among zero friends. How many cookies does each person get? See? It doesn't make sense. And Cookie Monster is sad that there are no cookies, and you are sad that you have no friends.";
public static final String LORE = "But, you can have a cookie anyways,\nsince you are sad you are have no friends.";
@Override

View file

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Iterator;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.StringUtils;
@ -21,16 +20,16 @@ public class Command_rainbowtag extends FreedomCommand
{
return false;
}
final String tag = ChatColor.stripColor(FUtil.colorize(StringUtils.join(args, " ")));
if(tag.length() > 20)
if (tag.length() > 20)
{
msg("That tag is too long (Max is 20 characters).");
return true;
}
for (String word : Command_tag.FORBIDDEN_WORDS)
for (String word : Command_tag.FORBIDDEN_WORDS)
{
if (tag.contains(word))
{
@ -40,7 +39,7 @@ public class Command_rainbowtag extends FreedomCommand
}
plugin.pl.getPlayer(playerSender).setTag(FUtil.rainbowify(tag));
msg("Set tag to " + tag);
return true;