8000 Example - Creating a message broadcasting system has incorrect code block · Issue #341 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content 6473
Example - Creating a message broadcasting system has incorrect code block #341
Closed
@JorelAli

Description

@JorelAli

Documentation URL

https://commandapi.jorel.dev/8.5.1/normalexecutors.html#example---creating-a-message-broadcasting-system

What the documentation currently says

image

Proposed fix

(Double reference to "normalcommandexecutors3" in Examples.java. Needs renaming and re-linking):

//Create our command
CommandAPICommand("broadcastmsg")
    .withArguments(GreedyStringArgument("message")) // The arguments
    .withAliases("broadcast", "broadcastmessage")       // Command aliases
    .withPermission(CommandPermission.OP)               // Required permissions
    .executes(CommandExecutor { sender, args ->
        String message = (String) args[0]
        Bukkit.getServer().broadcastMessage(message)
    })
    .register()

Metadata

Metadata

Assignees

No one assigned

    Labels

    critical bugA bug that should be fixed ASAPdocumentationDocumentation improvementimplemented for next releaseThis has been implemented in the current dev build for the next public release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0