mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-28 10:10:34 +00:00
Add example firework kit, and cleanup debug messages.
This commit is contained in:
parent
73c92bf742
commit
762bb65677
3 changed files with 7 additions and 24 deletions
|
@ -120,26 +120,7 @@ public class Commandfirework extends EssentialsCommand
|
|||
}
|
||||
else
|
||||
{
|
||||
final ItemStack stack = user.getItemInHand();
|
||||
if (stack.getType() == Material.FIREWORK)
|
||||
{
|
||||
FireworkMeta fmeta = (FireworkMeta)stack.getItemMeta();
|
||||
List<FireworkEffect> effects = fmeta.getEffects();
|
||||
user.sendMessage("The firework you are holding has the following effects:");
|
||||
|
||||
for (FireworkEffect effect : effects)
|
||||
{
|
||||
StringBuilder effectDesc = new StringBuilder();
|
||||
effectDesc.append("Effect: ");
|
||||
Map<String, Object> desc = effect.serialize();
|
||||
|
||||
for (String info : desc.keySet())
|
||||
{
|
||||
effectDesc.append(info).append(": ").append(desc.get(info)).append(" ");
|
||||
}
|
||||
user.sendMessage(effectDesc.toString());
|
||||
}
|
||||
}
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue