Skip to content

Feat : New command and button to teleport to a random warp#101

Open
Redstoner507 wants to merge 1 commit into
BuildTheEarth:mainfrom
Redstoner507:random-warp
Open

Feat : New command and button to teleport to a random warp#101
Redstoner507 wants to merge 1 commit into
BuildTheEarth:mainfrom
Redstoner507:random-warp

Conversation

@Redstoner507

Copy link
Copy Markdown
Contributor

Implemented random warp teleportation (Issue #80)

  • Added a new /warp random command to teleport players to a randomly selected warp from all available build team warps.
  • Added a new button in the warp menu to teleport players to a random warp from the selected warp group.

@Zoriot Zoriot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine so far

return handleMigrateCommand(player, args);
}

if (args[0].equalsIgnoreCase("random")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This subcommand currently bypasses the warp use permission.

return handleMigrateCommand(player, args);
}

if (args[0].equalsIgnoreCase("random")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The random subcommand doesn't show up in auto completion + all the other commands also not. Would probably make sense to fix that here

package net.buildtheearth.buildteamtools.modules.navigation.components.warps.commands;

import com.alpsbte.alpslib.utils.ChatHelper;
import jdk.jshell.execution.Util;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unused imports

@@ -1,5 +1,6 @@
package net.buildtheearth.buildteamtools.modules.navigation.components.warps.menu;

import jdk.jshell.execution.Util;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unused import


public static final int BACK_ITEM_SLOT = 27;
public static final int SWITCH_PAGE_ITEM_SLOT = 34;
public static final int RANDOM_ITEM_SLOT = 33;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overlaps with the buttons for the pages

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of introducing a subpermission for random warps? and if the user doesn't have the permission the button + subcommand are not shown / executable

@Zoriot Zoriot linked an issue Jul 18, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random Warp Command/Button

2 participants