From 5522fa24c9f90e4d54374bd5968b34fac2922ec7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Dec 2021 15:53:26 +0100 Subject: [PATCH] Update NightVisionCommand Signed-off-by: yoyosource --- .../features/util/NightVisionCommand.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java index 7c5758ee..245d561a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/util/NightVisionCommand.java @@ -20,10 +20,10 @@ package de.steamwar.bausystem.features.util; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.SWUtils; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; +import net.md_5.bungee.api.ChatMessageType; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; @@ -35,20 +35,14 @@ public class NightVisionCommand extends SWCommand { super("nightvision", "nv", "light"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "DebugStick"); - BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_COMMAND_HELP", p); - } - - @Register + @Register(description = "VISION_COMMAND_HELP") public void genericCommand(Player p) { if (p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { p.removePotionEffect(PotionEffectType.NIGHT_VISION); - SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("NIGHT-VISION_OFF", p)); + BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_OFF", p, ChatMessageType.ACTION_BAR); return; } p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 1000000, 255, false, false)); - SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("NIGHT-VISION_ON", p)); + BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_ON", p, ChatMessageType.ACTION_BAR); } } \ No newline at end of file