From ed9200689c45e067e38aeb192cceac818123cffa Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Fri, 27 Jul 2018 14:54:37 -0700 Subject: [PATCH] add a usage to cookie (#104) --- .../totalfreedommod/command/Command_cookie.java | 7 ++++--- .../totalfreedommod/command/Command_rainbowtag.java | 13 ++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java index 21e65993..9aac47c2 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cookie.java @@ -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 = "/") 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 diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_rainbowtag.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_rainbowtag.java index 4fcb68bc..1a85fe0e 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_rainbowtag.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_rainbowtag.java @@ -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;