Translatable #62
@ -20,10 +20,10 @@
|
|||||||
package de.steamwar.bausystem.features.util;
|
package de.steamwar.bausystem.features.util;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.SWUtils;
|
|
||||||
import de.steamwar.bausystem.linkage.LinkageType;
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
import de.steamwar.bausystem.linkage.Linked;
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
@ -35,20 +35,14 @@ public class NightVisionCommand extends SWCommand {
|
|||||||
super("nightvision", "nv", "light");
|
super("nightvision", "nv", "light");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(help = true)
|
@Register(description = "VISION_COMMAND_HELP")
|
||||||
public void genericHelp(Player p, String... args) {
|
|
||||||
BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "DebugStick");
|
|
||||||
BauSystem.MESSAGE.sendPrefixless("NIGHT-VISION_COMMAND_HELP", p);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Register
|
|
||||||
public void genericCommand(Player p) {
|
public void genericCommand(Player p) {
|
||||||
if (p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) {
|
if (p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) {
|
||||||
p.removePotionEffect(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;
|
return;
|
||||||
}
|
}
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 1000000, 255, false, false));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren