mirror of https://github.com/cabaletta/baritone
bep
This commit is contained in:
parent
4e2095d251
commit
a5edfff370
|
@ -44,6 +44,8 @@ import java.util.function.BiConsumer;
|
|||
*/
|
||||
public final class Settings {
|
||||
|
||||
public final Setting<Boolean> iUnderstandThatBepWillUnironicallySendMyCoordsInChat = new Setting<>(false);
|
||||
|
||||
/**
|
||||
* Allow Baritone to break blocks
|
||||
*/
|
||||
|
|
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<String> tabComplete(String label, IArgConsumer args) {
|
||||
return Stream.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getShortDesc() {
|
||||
return "Send coords in chat";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLongDesc() {
|
||||
return Arrays.asList(
|
||||
"Sends your coords in chat.",
|
||||
"",
|
||||
"Usage:",
|
||||
"> bep"
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue