Remove /hd fix in 1.8+

This commit is contained in:
filoghost 2014-12-21 15:29:32 +01:00
parent 15828f320d
commit 828870345e
2 changed files with 6 additions and 2 deletions

View File

@ -47,8 +47,8 @@ public class HologramsCommandHandler implements CommandExecutor {
registerSubCommand(new TeleportCommand());
registerSubCommand(new MovehereCommand());
registerSubCommand(new AlignCommand());
registerSubCommand(new FixCommand());
registerSubCommand(new ReloadCommand());
registerSubCommand(new FixCommand());
registerSubCommand(new RemovelineCommand());
registerSubCommand(new SetlineCommand());

View File

@ -7,6 +7,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import com.gmail.filoghost.holographicdisplays.HolographicDisplays;
import com.gmail.filoghost.holographicdisplays.commands.Colors;
import com.gmail.filoghost.holographicdisplays.commands.CommandValidator;
import com.gmail.filoghost.holographicdisplays.commands.Strings;
@ -35,10 +36,13 @@ public class FixCommand extends HologramSubCommand {
@Override
public void execute(CommandSender sender, String label, String[] args) throws CommandException {
CommandValidator.isTrue(!HolographicDisplays.is1_8(), "This command is no longer necessary in 1.8+. The holograms already use the correct ambient light.");
NamedHologram hologram = NamedHologramManager.getHologram(args[0].toLowerCase());
CommandValidator.notNull(hologram, Strings.NO_SUCH_HOLOGRAM);
if (args.length <= 1) {
if (args.length <= 1) {
sender.sendMessage(Colors.PRIMARY + "This command will put a glowstone 16 blocks above the hologram to fix the lightning.");
sender.sendMessage(Colors.PRIMARY + "If you're sure, type " + Colors.SECONDARY + "/" + label + " fix " + args[0].toLowerCase() + " confirm");
return;