3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Align annotation formatting with brush command methods

Dieser Commit ist enthalten in:
Kenzie Togami 2019-04-15 02:03:05 -07:00
Ursprung e4d8091432
Commit e127bb89e5
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
2 geänderte Dateien mit 26 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -75,7 +75,8 @@ public class BiomeCommands {
) )
@CommandPermissions("worldedit.biome.list") @CommandPermissions("worldedit.biome.list")
public void biomeList(Player player, 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 offset;
int count = 0; int count = 0;
@ -115,12 +116,10 @@ public class BiomeCommands {
) )
@CommandPermissions("worldedit.biome.info") @CommandPermissions("worldedit.biome.info")
public void biomeInfo(Player player, LocalSession session, public void biomeInfo(Player player, LocalSession session,
@Switch( @Switch(name = 't', desc="Use the block you are looking at.")
name = 't', desc="Use the block you are looking at." boolean useLineOfSight,
) boolean useLineOfSight, @Switch(name = 'p', desc="Use the block you are currently in.")
@Switch( boolean usePosition) throws WorldEditException {
name = 'p', desc="Use the block you are currently in."
) boolean usePosition) throws WorldEditException {
BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager() BiomeRegistry biomeRegistry = WorldEdit.getInstance().getPlatformManager()
.queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry(); .queryCapability(Capability.GAME_HOOKS).getRegistries().getBiomeRegistry();
Set<BiomeType> biomes = new HashSet<>(); Set<BiomeType> biomes = new HashSet<>();
@ -179,7 +178,8 @@ public class BiomeCommands {
@CommandPermissions("worldedit.biome.set") @CommandPermissions("worldedit.biome.set")
public void setBiome(Player player, LocalSession session, EditSession editSession, public void setBiome(Player player, LocalSession session, EditSession editSession,
BiomeType target, 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(); World world = player.getWorld();
Region region; Region region;
Mask mask = editSession.getMask(); Mask mask = editSession.getMask();

Datei anzeigen

@ -91,8 +91,10 @@ public class SchematicCommands {
) )
@CommandPermissions({"worldedit.clipboard.load", "worldedit.schematic.load"}) @CommandPermissions({"worldedit.clipboard.load", "worldedit.schematic.load"})
public void load(Player player, LocalSession session, public void load(Player player, LocalSession session,
@Arg(desc = "File name.") String filename, @Arg(desc = "File name.")
@Arg(desc = "Format name.", def = "sponge") String formatName) throws FilenameException { String filename,
@Arg(desc = "Format name.", def = "sponge")
String formatName) throws FilenameException {
LocalConfiguration config = worldEdit.getConfiguration(); LocalConfiguration config = worldEdit.getConfiguration();
File dir = worldEdit.getWorkingDirectoryFile(config.saveDir); File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
@ -134,9 +136,12 @@ public class SchematicCommands {
) )
@CommandPermissions({"worldedit.clipboard.save", "worldedit.schematic.save"}) @CommandPermissions({"worldedit.clipboard.save", "worldedit.schematic.save"})
public void save(Player player, LocalSession session, public void save(Player player, LocalSession session,
@Arg(desc = "File name.") String filename, @Arg(desc = "File name.")
@Arg(desc = "Format name.", def = "sponge") String formatName, String filename,
@Switch(name = 'f', desc = "Overwrite an existing file.") boolean allowOverwrite @Arg(desc = "Format name.", def = "sponge")
String formatName,
@Switch(name = 'f', desc = "Overwrite an existing file.")
boolean allowOverwrite
) throws WorldEditException { ) throws WorldEditException {
LocalConfiguration config = worldEdit.getConfiguration(); LocalConfiguration config = worldEdit.getConfiguration();
@ -205,7 +210,8 @@ public class SchematicCommands {
) )
@CommandPermissions("worldedit.schematic.delete") @CommandPermissions("worldedit.schematic.delete")
public void delete(Actor actor, 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(); LocalConfiguration config = worldEdit.getConfiguration();
File dir = worldEdit.getWorkingDirectoryFile(config.saveDir); File dir = worldEdit.getWorkingDirectoryFile(config.saveDir);
@ -263,9 +269,12 @@ public class SchematicCommands {
) )
@CommandPermissions("worldedit.schematic.list") @CommandPermissions("worldedit.schematic.list")
public void list(Actor actor, public void list(Actor actor,
@ArgFlag(name = 'p', desc = "Page to view.", def = "1") int page, @ArgFlag(name = 'p', desc = "Page to view.", def = "1")
@Switch(name = 'd', desc = "Sort by date, oldest first") boolean oldFirst, int page,
@Switch(name = 'n', desc = "Sort by date, newest first") boolean newFirst) { @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) { if (oldFirst && newFirst) {
throw new StopExecutionException("Cannot sort by oldest and newest."); throw new StopExecutionException("Cannot sort by oldest and newest.");
} }