Update CommandIrisWhatBlock.java

Prevent duplicate message
Fix some whitespace
This commit is contained in:
BuildTools 2020-10-23 10:20:42 +02:00
parent 7fdbebfb70
commit dab69b2ffe

View File

@ -39,47 +39,37 @@ public class CommandIrisWhatBlock extends MortarCommand
bd = null; bd = null;
} }
if(bd != null) if(bd != null) {
{
sender.sendMessage("Material: " + C.GREEN + bd.getMaterial().name()); sender.sendMessage("Material: " + C.GREEN + bd.getMaterial().name());
sender.sendMessage("Full: " + C.WHITE + bd.getAsString(true)); sender.sendMessage("Full: " + C.WHITE + bd.getAsString(true));
if(B.isStorage(FastBlockData.of(bd))) if (B.isStorage(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Storage Block (Loot Capable)"); sender.sendMessage(C.YELLOW + "* Storage Block (Loot Capable)");
} }
if(B.isLit(FastBlockData.of(bd))) if (B.isLit(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Lit Block (Light Capable)"); sender.sendMessage(C.YELLOW + "* Lit Block (Light Capable)");
} }
if(B.isFoliage(FastBlockData.of(bd))) if (B.isFoliage(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Foliage Block"); sender.sendMessage(C.YELLOW + "* Foliage Block");
} }
if(B.isDecorant(FastBlockData.of(bd))) if (B.isDecorant(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Decorant Block"); sender.sendMessage(C.YELLOW + "* Decorant Block");
} }
if(B.isFluid(FastBlockData.of(bd))) if (B.isFluid(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Fluid Block"); sender.sendMessage(C.YELLOW + "* Fluid Block");
} }
if(B.isFoliagePlantable(FastBlockData.of(bd))) if (B.isFoliagePlantable(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Plantable Foliage Block"); sender.sendMessage(C.YELLOW + "* Plantable Foliage Block");
} }
if(B.isSolid(FastBlockData.of(bd))) if (B.isSolid(FastBlockData.of(bd))) {
{
sender.sendMessage(C.YELLOW + "* Solid Block"); sender.sendMessage(C.YELLOW + "* Solid Block");
} }
} else {
sender.sendMessage("Please look at any block, not at the sky");
} }
} }