Merge pull request #956 from LoganDark/commands
Pulling in logandark's uncommitted changes to commands staging
This commit is contained in:
commit
fc43ef9308
@ -85,7 +85,7 @@ public interface Helper {
|
|||||||
* @param color The color to print that message in
|
* @param color The color to print that message in
|
||||||
*/
|
*/
|
||||||
default void logDirect(String message, TextFormatting color) {
|
default void logDirect(String message, TextFormatting color) {
|
||||||
Arrays.stream(message.split("\\n")).forEach(line -> {
|
Arrays.stream(message.split("\n")).forEach(line -> {
|
||||||
ITextComponent component = new TextComponentString(line.replace("\t", " "));
|
ITextComponent component = new TextComponentString(line.replace("\t", " "));
|
||||||
component.getStyle().setColor(color);
|
component.getStyle().setColor(color);
|
||||||
logDirect(component);
|
logDirect(component);
|
||||||
|
@ -23,7 +23,7 @@ import net.minecraft.util.EnumFacing;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic representation of a schematic. Provides the dimensions and the desired statefor a given position relative to
|
* Basic representation of a schematic. Provides the dimensions and the desired state for a given position relative to
|
||||||
* the origin.
|
* the origin.
|
||||||
*
|
*
|
||||||
* @author leijurv
|
* @author leijurv
|
||||||
|
@ -52,6 +52,18 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener {
|
|||||||
public final IBaritone baritone;
|
public final IBaritone baritone;
|
||||||
public final IPlayerContext ctx;
|
public final IPlayerContext ctx;
|
||||||
public final Settings settings = BaritoneAPI.getSettings();
|
public final Settings settings = BaritoneAPI.getSettings();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In certain cases chat components need to execute commands for you. For example, the paginator automatically runs
|
||||||
|
* commands when you click the forward and back arrows to show you the previous/next page.
|
||||||
|
* <p>
|
||||||
|
* If the prefix is changed in the meantime, then the command will go to chat. That's no good. So here's a permanent
|
||||||
|
* prefix that forces a command to run, regardless of the current prefix, chat/prefix control being enabled, etc.
|
||||||
|
* <p>
|
||||||
|
* If used right (by both developers and users), it should be impossible to expose a command accidentally to the
|
||||||
|
* server. As a rule of thumb, if you have a clickable chat component, always use this prefix. If you're suggesting
|
||||||
|
* a command (a component that puts text into your text box, or something else), use {@link Settings#prefix}.
|
||||||
|
*/
|
||||||
public static String FORCE_COMMAND_PREFIX = String.format("<<%s>>", UUID.randomUUID().toString());
|
public static String FORCE_COMMAND_PREFIX = String.format("<<%s>>", UUID.randomUUID().toString());
|
||||||
|
|
||||||
public BaritoneChatControl(IBaritone baritone) {
|
public BaritoneChatControl(IBaritone baritone) {
|
||||||
|
Loading…
Reference in New Issue
Block a user