WiIIiam278 / HuskHomes

The powerful & intuitive homes, warps, and teleportation suite
https://william278.net/project/huskhomes
Apache License 2.0
127 stars 82 forks source link

Bug Report: TPA Command Sends Request to Incorrect User #700

Closed EnTIv closed 3 weeks ago

EnTIv commented 1 month ago

Description

While using the HuskHome plugin, issuing the command /tpa EnTIv incorrectly sends the teleport request to EnTIv_2 instead of EnTIv.

Steps to Reproduce

  1. Log in with a user that has permission to use teleport commands.
  2. Use the command /tpa EnTIv to send a teleport request to the user "EnTIv".
  3. Observe that the teleport request is received by "EnTIv_2".

Expected Behavior

The teleport request should be received by the user "EnTIv", as specified in the command.

Actual Behavior

The teleport request is received by "EnTIv_2".

Possible Solution

This issue may be related to how the plugin handles usernames that are subsets of other usernames. It might be useful to check how the plugin searches and matches username inputs for teleport commands.

Your Environment

Please look into this issue as it can affect gameplay significantly. Thank you!

WiIIiam278 commented 1 month ago

Known issue, been a thing for years, unfortunately it's a problem at a low level involving the way in which the plugin message protocol targets usernames instead of UUIDs. Probably a thing to tackle in the next rewrite.

WiIIiam278 commented 3 weeks ago

Think I found a logic issue which may fix this, please try in the latest commit build (https://william278.net/project/huskhomes -> "Alpha" channel).