diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 897182898..4a4662957 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -44,6 +44,8 @@ import java.util.function.BiConsumer; */ public final class Settings { + public final Setting iUnderstandThatBepWillUnironicallySendMyCoordsInChat = new Setting<>(false); + /** * Allow Baritone to break blocks */ diff --git a/src/main/java/baritone/command/defaults/BepCommand.java b/src/main/java/baritone/command/defaults/BepCommand.java new file mode 100644 index 000000000..8e1e3ead5 --- /dev/null +++ b/src/main/java/baritone/command/defaults/BepCommand.java @@ -0,0 +1,65 @@ +/* + * This file is part of Baritone. + * + * Baritone is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Baritone is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Baritone. If not, see . + */ + +package baritone.command.defaults; + +import baritone.Baritone; +import baritone.api.IBaritone; +import baritone.api.command.Command; +import baritone.api.command.argument.IArgConsumer; +import baritone.api.command.exception.CommandException; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; + +public class BepCommand extends Command { + + public BepCommand(IBaritone baritone) { + super(baritone, "bep"); + } + + @Override + public void execute(String label, IArgConsumer args) throws CommandException { + args.requireMax(0); + if (Baritone.settings().iUnderstandThatBepWillUnironicallySendMyCoordsInChat.value) { + ctx.player().sendChatMessage("bep. my coords are " + ctx.playerFeet().x + " " + ctx.playerFeet().z); + } else { + logDirect("you must first accept the terms and conditions of bep (that it sends coords in chat) by enabling the setting #iUnderstandThatBepWillUnironicallySendMyCoordsInChat"); + } + } + + @Override + public Stream tabComplete(String label, IArgConsumer args) { + return Stream.empty(); + } + + @Override + public String getShortDesc() { + return "Send coords in chat"; + } + + @Override + public List getLongDesc() { + return Arrays.asList( + "Sends your coords in chat.", + "", + "Usage:", + "> bep" + ); + } +} diff --git a/src/main/java/baritone/command/defaults/DefaultCommands.java b/src/main/java/baritone/command/defaults/DefaultCommands.java index e998dcc97..49b9bc107 100644 --- a/src/main/java/baritone/command/defaults/DefaultCommands.java +++ b/src/main/java/baritone/command/defaults/DefaultCommands.java @@ -65,7 +65,8 @@ public final class DefaultCommands { new WaypointsCommand(baritone), new CommandAlias(baritone, "sethome", "Sets your home waypoint", "waypoints save home"), new CommandAlias(baritone, "home", "Path to your home waypoint", "waypoints goto home"), - new SelCommand(baritone) + new SelCommand(baritone), + new BepCommand(baritone) )); ExecutionControlCommands prc = new ExecutionControlCommands(baritone); commands.add(prc.pauseCommand);