Okay so I don't really know if this will get taken down because I feel like it's more on the request side than asking.

How do I do name shortening like the one the admins use like .kill bui and kills Builderman

2 comments

0

This can range from a simple, to unusually complex task depending on how you perceive the best approach in this scenario—as there are multiple different ways to go about it. Personally, if I am trying to piece up a ChatMessage, I'd use the :split() separation method of the String class for singular analysis; I usually use the :gsub() method in conjunction with this to isolate, E.g from prefixes.

0

The final product will result in an array, which makes the individual evaluation a much smoother process. Here, you can use the textual attributes to locate a matching command handle, and a following "argument"—this of which is our shortened username. To pinpoint a Player with a severed reference, you can easily iterate through all players, and match their username to the fragment.