Skip to content

Commit

Permalink
GH-526 Add required argument annotation to home commands (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy authored Sep 11, 2023
1 parent 7a0c748 commit e8c376a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.eternalcode.core.shared.PositionAdapter;
import com.eternalcode.core.teleport.TeleportService;
import com.eternalcode.core.teleport.TeleportTaskService;
import dev.rollczi.litecommands.command.amount.Required;
import dev.rollczi.litecommands.command.execute.Execute;
import dev.rollczi.litecommands.command.permission.Permission;
import dev.rollczi.litecommands.command.route.Route;
Expand All @@ -33,6 +34,7 @@ public HomeCommand(TeleportTaskService teleportTaskService, TeleportService tele
}

@Execute
@Required(0)
@DescriptionDocs(description = "Teleports to the first home if the player has no other homes set, if player has eternalcore.teleport.bypass permission, eternalcore will be ignore teleport time")
void execute(Player player) {
Collection<Home> playerHomes = this.homeManager.getHomes(player.getUniqueId());
Expand All @@ -51,6 +53,7 @@ void execute(Player player) {
}

@Execute
@Required(1)
@DescriptionDocs(description = "Teleport to home, if player has eternalcore.teleport.bypass permission, eternalcore will be ignore teleport time", arguments = "<home>")
void execute(Player player, @ArgHome Home home) {
this.teleportToHome(player, home);
Expand Down

0 comments on commit e8c376a

Please sign in to comment.