Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
Align annotation formatting with brush command methods
Dieser Commit ist enthalten in:
Ursprung
e4d8091432
Commit
e127bb89e5
@ -75,7 +75,8 @@ public class BiomeCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.biome.list")
|
||||
public void biomeList(Player player,
|
||||
@Arg(desc = "Page number.", def = "0") int page) throws WorldEditException {
|
||||
@Arg(desc = "Page number.", def = "0")
|
||||
int page) throws WorldEditException {
|
||||
int offset;
|
||||
int count = 0;
|
||||
|
||||
@ -115,12 +116,10 @@ public class BiomeCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.biome.info")
|
||||
public void biomeInfo(Player player, LocalSession session,
|
||||
@Switch(
|
||||
name = 't', desc="Use the block you are looking at."
|
||||
) boolean useLineOfSight,
|
||||
@Switch(
|
||||
name = 'p', desc="Use the block you are currently in."
|
||||
) boolean usePosition) throws WorldEditException {
|
||||
@Switch(name = 't', desc="Use the block you are looking at.")
|
||||
boolean useLineOfSight,
|
||||
@Switch(name = 'p', desc="Use the block you are currently in.")
|
||||
boolean usePosition) throws WorldEditException {
|
||||
BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager()
|
||||
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry();
|
||||
Set<BiomeType> biomes = new HashSet<>();
|
||||
@ -179,7 +178,8 @@ public class BiomeCommands {
|
||||
@CommandPermissions("worldedit.biome.set")
|
||||
public void setBiome(Player player, LocalSession session, EditSession editSession,
|
||||
BiomeType target,
|
||||
@Switch(name = 'p', desc = "Use your current position") boolean atPosition) throws WorldEditException {
|
||||
@Switch(name = 'p', desc = "Use your current position")
|
||||
boolean atPosition) throws WorldEditException {
|
||||
World world = player.getWorld();
|
||||
Region region;
|
||||
Mask mask = editSession.getMask();
|
||||
|
@ -91,8 +91,10 @@ public class SchematicCommands {
|
||||
)
|
||||
@CommandPermissions({"worldedit.clipboard.load", "worldedit.schematic.load"})
|
||||
public void load(Player player, LocalSession session,
|
||||
@Arg(desc = "File name.") String filename,
|
||||
@Arg(desc = "Format name.", def = "sponge") String formatName) throws FilenameException {
|
||||
@Arg(desc = "File name.")
|
||||
String filename,
|
||||
@Arg(desc = "Format name.", def = "sponge")
|
||||
String formatName) throws FilenameException {
|
||||
LocalConfiguration config = worldEdit.getConfiguration();
|
||||
|
||||
File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
@ -134,9 +136,12 @@ public class SchematicCommands {
|
||||
)
|
||||
@CommandPermissions({"worldedit.clipboard.save", "worldedit.schematic.save"})
|
||||
public void save(Player player, LocalSession session,
|
||||
@Arg(desc = "File name.") String filename,
|
||||
@Arg(desc = "Format name.", def = "sponge") String formatName,
|
||||
@Switch(name = 'f', desc = "Overwrite an existing file.") boolean allowOverwrite
|
||||
@Arg(desc = "File name.")
|
||||
String filename,
|
||||
@Arg(desc = "Format name.", def = "sponge")
|
||||
String formatName,
|
||||
@Switch(name = 'f', desc = "Overwrite an existing file.")
|
||||
boolean allowOverwrite
|
||||
) throws WorldEditException {
|
||||
LocalConfiguration config = worldEdit.getConfiguration();
|
||||
|
||||
@ -205,7 +210,8 @@ public class SchematicCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.schematic.delete")
|
||||
public void delete(Actor actor,
|
||||
@Arg(desc = "File name.") String filename) throws WorldEditException {
|
||||
@Arg(desc = "File name.")
|
||||
String filename) throws WorldEditException {
|
||||
LocalConfiguration config = worldEdit.getConfiguration();
|
||||
File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
|
||||
|
||||
@ -263,9 +269,12 @@ public class SchematicCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.schematic.list")
|
||||
public void list(Actor actor,
|
||||
@ArgFlag(name = 'p', desc = "Page to view.", def = "1") int page,
|
||||
@Switch(name = 'd', desc = "Sort by date, oldest first") boolean oldFirst,
|
||||
@Switch(name = 'n', desc = "Sort by date, newest first") boolean newFirst) {
|
||||
@ArgFlag(name = 'p', desc = "Page to view.", def = "1")
|
||||
int page,
|
||||
@Switch(name = 'd', desc = "Sort by date, oldest first")
|
||||
boolean oldFirst,
|
||||
@Switch(name = 'n', desc = "Sort by date, newest first")
|
||||
boolean newFirst) {
|
||||
if (oldFirst && newFirst) {
|
||||
throw new StopExecutionException("Cannot sort by oldest and newest.");
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren