Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for tab complete to use displaynames #4432

Merged
merged 8 commits into from
Aug 19, 2021

Conversation

cyberkitsune
Copy link
Contributor

@cyberkitsune cyberkitsune commented Aug 2, 2021

Information

This PR closes #4431.

Details

Proposed feature:
This feature adds a new configuration option, change-tab-complete-name

When change-tab-complete-name is turned on, getPlayers() in EssentialsCommand will use getDisplayName() instead of getName(); Populating the list with display names instead of player names.

Environments tested:

OS: Linux, Pterodactyl Java 11 Docker Container

Java version: openjdk version "11.0.10" 2021-01-19

  • Most recent Paper version (1.17.1, git-Paper-151)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:
image

Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

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

A few things plus you should return Collections.emptyList() in the following places:

return null; // It's a chat message, use the default chat handler

@JRoy JRoy added module: main Issues or PRs for the main Essentials module type: enhancement Features and feature requests. labels Aug 2, 2021
@JRoy JRoy added this to the 2.19.0 milestone Aug 2, 2021
for `/mail` when a recipient is specified
for `/msg` when a recipient is specified
@cyberkitsune cyberkitsune requested a review from JRoy August 2, 2021 22:51
JRoy
JRoy previously approved these changes Aug 2, 2021
@JRoy JRoy requested a review from mdcfe August 2, 2021 22:58
mdcfe
mdcfe previously approved these changes Aug 19, 2021
@mdcfe mdcfe changed the title Add the ability for tab complete to use display names instead of player names Add option for tab complete to use displaynames Aug 19, 2021
@mdcfe mdcfe enabled auto-merge (squash) August 19, 2021 19:58
@mdcfe mdcfe merged commit c062651 into EssentialsX:2.x Aug 19, 2021
GenSecrets added a commit to GenSecrets/Essentials that referenced this pull request Sep 3, 2021
commit fde6524
Author: MD <[email protected]>
Date:   Wed Sep 1 18:37:46 2021 +0100

    Fix error with commands ending in single colon (EssentialsX#4508)

    Co-authored-by: Josh Roy <[email protected]>

commit b288696
Author: triagonal <[email protected]>
Date:   Thu Sep 2 03:33:43 2021 +1000

    Update to bStats v2 (EssentialsX#4350)

    Co-authored-by: MD <[email protected]>
    Co-authored-by: Josh Roy <[email protected]>

commit 19ca518
Author: Josh Roy <[email protected]>
Date:   Wed Sep 1 05:26:54 2021 -0700

    Replace unneeded inputs with new /ess dump in issue template (EssentialsX#4479)

    Co-authored-by: MD <[email protected]>

commit b86a34c
Author: Josh Roy <[email protected]>
Date:   Wed Sep 1 04:55:37 2021 -0700

    Prepare for 2.19.1 dev builds (EssentialsX#4505)

commit d145fbc
Author: MD <[email protected]>
Date:   Tue Aug 31 21:27:35 2021 +0100

    Require forceSign property even on releases

commit 3ca960e
Author: Josh Roy <[email protected]>
Date:   Tue Aug 31 13:04:34 2021 -0400

    Release 2.19.0

commit 8bbaf7d
Author: MD <[email protected]>
Date:   Tue Aug 31 16:53:09 2021 +0100

    Update Gradle to 7.2; set run-paper to 1.17.1 with toolchain (EssentialsX#4496)

    :chatting:

commit 14c2ab5
Author: Josh Roy <[email protected]>
Date:   Tue Aug 31 08:34:10 2021 -0700

    Add online mode data for /ess dump (EssentialsX#4497)

    EssentialsX/Website#60

commit 6f20a78
Author: Josh Roy <[email protected]>
Date:   Tue Aug 31 08:28:44 2021 -0700

    Delete (& backup) invalid NPC accounts created by poor econ code (EssentialsX#4490)

    Co-authored-by: MD <[email protected]>

    my magnum opus

    ---

    * Delete (& backup) invalid NPC accounts created by poor econ code

    * Add feedback for large migrations

    * Improve feedback messages

    - Improve the wording of console messages
    - Include details about how to resume purging userdata in case it gets interrupted
    - Scale the message delay based on the number of userdata files to be processed
    - Always cancel the repeating task and shut down the executor when we're done

    * Update Essentials/src/main/java/com/earth2me/essentials/EssentialsUpgrade.java

    * Add less ranty context to rant

    At least I had caffeine before writing this

commit 4bee159
Author: Josh Roy <[email protected]>
Date:   Sat Aug 28 09:32:45 2021 -0700

    Fix economy usernames being unsanitized in some places (EssentialsX#4484)

    Co-authored-by: MD <[email protected]>

    This PR fixes various issues with NPC accounts:
    - Fixes some NPC account names not being sanitised
    - Fixes wrong keys being used when manually generating a NPC account file
    - Adds some debug logging to `UserMap` name lookups

commit e4c179f
Author: pop4959 <[email protected]>
Date:   Sat Aug 28 08:46:38 2021 -0700

    Allow auto equip in nbt serialized kits (EssentialsX#4491)

    Co-authored-by: Josh Roy <[email protected]>

commit 4811eb1
Author: Josh Roy <[email protected]>
Date:   Fri Aug 27 13:50:41 2021 -0700

    Fix /ess dump on 1.8.8 (EssentialsX#4489)

    Fixes EssentialsX#4487

    pain

commit 69850d8
Author: Josh Roy <[email protected]>
Date:   Thu Aug 26 13:12:52 2021 -0700

    Fix NoClassDefFoundError on < 1.12 with Discord execute command (EssentialsX#4478)

commit df88a89
Author: Josh Roy <[email protected]>
Date:   Thu Aug 26 13:09:16 2021 -0700

    Add missing translation for argument pipe color (EssentialsX#4480)

commit c746a1c
Author: Josh Roy <[email protected]>
Date:   Tue Aug 24 03:35:53 2021 -0700

    Bump Configurate (EssentialsX#4475)

    Some performance improvements, <3 zml

commit ecdaed7
Author: Flask Bot <[email protected]>
Date:   Thu Aug 19 21:11:35 2021 +0100

    New Crowdin updates (EssentialsX#4281)

commit c062651
Author: CyberKitsune <[email protected]>
Date:   Thu Aug 19 13:00:06 2021 -0700

    Add option for tab complete to use displaynames (EssentialsX#4432)

    Co-authored-by: MD <[email protected]>

    This feature adds a new configuration option, `change-tab-complete-name`

    When `change-tab-complete-name` is turned on, `getPlayers()` in `EssentialsCommand` will use `getDisplayName()` instead of `getName()`; populating the list with display names instead of player names.

    Closes EssentialsX#4431.

commit 3692740
Author: Josh Roy <[email protected]>
Date:   Thu Aug 19 12:35:19 2021 -0700

    Add `/ess dump` command to generate a debug dump output (EssentialsX#4361)

    Co-authored-by: MD <[email protected]>

    Command usage: /essentials dump [config] [discord] [kits] [log]

    Either of the optional args can be used to add the given data to the dump.

    Related: EssentialsX/Website#51

commit 1179caa
Author: Josh Roy <[email protected]>
Date:   Thu Aug 12 04:37:19 2021 -0700

    Fix bot-command-relay option not ignoring itself (EssentialsX#4453)

commit 35b1a28
Author: Josh Roy <[email protected]>
Date:   Tue Aug 10 07:51:33 2021 -0700

    Fix improper MOTD delay check (EssentialsX#4454)

commit 36432c6
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 14:30:30 2021 -0700

    Fix NPE on webhooks messages with show-webhook-messages enabled (EssentialsX#4452)

    Co-authored-by: MD <[email protected]>

    Fixes EssentialsX#4451.

commit 871e718
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 13:23:49 2021 -0700

    Add online/unique placeholders to join/leave formats for discord (EssentialsX#4427)

commit 4229359
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 12:56:38 2021 -0700

    Add config option to disable verbose usage strings (EssentialsX#4396)

    Co-authored-by: MD <[email protected]>

    ```yml
    # Whether or not Essentials should show detailed command usages.
    # If set to false, Essentials will collapse all usages in to one single usage message.
    verbose-command-usages: true
    ```

    This PR also fixes a regression in legacy usage strings where the `<command>` wasn't replaced.

commit ac8a13f
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 12:48:43 2021 -0700

    Add name parameter for Discord avatar URL (EssentialsX#4369)

    Allows offline mode/Geyser users to configure their own avatar URL using a service that accepts usernames.

commit d56ecaa
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 12:39:55 2021 -0700

    Allow world name fallback for LazyLocation (EssentialsX#4428)

    Co-authored-by: MD <[email protected]>

commit 14fbfe3
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 12:22:09 2021 -0700

    Allow disabling MOTD task and cancel on player logout (EssentialsX#4411)

    This PR allows setting `delay-motd` to a negative value in `config.yml` to disable the MOTD join task without disabling `/motd`, and fixes an issue where delayed MOTD tasks would run even after a player logged out (in case someone previously set an insanely high MOTD delay to "disable" the MOTD on join).

    Fixes EssentialsX#4408.

commit 5334a3f
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 12:14:15 2021 -0700

    Move update check message out of MOTD task (EssentialsX#4410)

    Update message will now show after mail, and will not be affected by insane MOTD delays.

commit 2fa9c64
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 11:59:36 2021 -0700

    Fix disabled-commands not removing aliases (EssentialsX#4399)

    Fixes EssentialsX#4383, an issue where only the main command name is disabled instead of the alias specified in `config.yml`.

commit c221e96
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 11:57:03 2021 -0700

    Make discord chat format world name use world alias (EssentialsX#4419)

commit 26c016f
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 11:48:01 2021 -0700

    Add config option to allow webhooks/bots to send commands (EssentialsX#4442)

    ```yml
    # Console relay settings
    # The console relay sends every message shown in the console to a Discord channel.
    console:
      ...
      # Set to true if bots/webhooks should be able to send commands through the command relay.
      bot-command-relay: false
    ```

commit b6a08ec
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 11:44:13 2021 -0700

    Fix force-disable-teleport-safety enforcing world border (EssentialsX#4371)

commit 9179c6c
Author: Josh Roy <[email protected]>
Date:   Mon Aug 9 11:38:04 2021 -0700

    Update EssXDiscord tutorial for new developer mode location (EssentialsX#4409)

commit 3f9aceb
Author: Josh Roy <[email protected]>
Date:   Sat Aug 7 17:22:12 2021 -0400

    Add DiscordService#sendChatMessage

    Allows plugins to send messages to the chat channel via API using the format from our config

commit 3da8efa
Author: Josh Roy <[email protected]>
Date:   Sat Aug 7 11:40:06 2021 -0400

    Fix incorrect parameter name for allowGroupMentions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: main Issues or PRs for the main Essentials module type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants