9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

先改了一半

This commit is contained in:
XiaoMoMi
2025-05-06 20:04:22 +08:00
parent d2ee1f2957
commit b01d564e4f
5 changed files with 29 additions and 31 deletions

View File

@@ -3,8 +3,10 @@ package net.momirealms.craftengine.core.plugin.command;
import org.incendo.cloud.parser.flag.CommandFlag;
public final class FlagKeys {
private FlagKeys() {}
public static final String SILENT = "silent";
public static final CommandFlag<Void> SILENT_FLAG = CommandFlag.builder("silent").withAliases("s").build();
public static final CommandFlag<Void> SILENT_FLAG = CommandFlag.builder(SILENT).withAliases("s").build();
public static final String TO_INVENTORY = "to-inventory";
public static final CommandFlag<Void> TO_INVENTORY_FLAG = CommandFlag.builder("to-inventory").build();
public static final CommandFlag<Void> TO_INVENTORY_FLAG = CommandFlag.builder(TO_INVENTORY).build();
}

View File

@@ -12,6 +12,10 @@ public class ChunkPos {
this.longKey = asLong(this.x, this.z);
}
public static ChunkPos of(final int x, final int z) {
return new ChunkPos(x, z);
}
public ChunkPos(BlockPos pos) {
this.x = SectionPos.blockToSectionCoord(pos.x());
this.z = SectionPos.blockToSectionCoord(pos.z());