booksaw / BetterTeams

Create teams to fight to be the best (Minecraft Plugin)
https://www.spigotmc.org/resources/better-teams.17129/
MIT License
70 stars 46 forks source link

Enhances /teama teleport #550

Closed EarthCow closed 7 months ago

EarthCow commented 8 months ago

Reworks the /teama teleport command adding a bunch of new features. Teleporting all teams at once is now possible as well as teleporting teams to their homes (closes #534). Additionally, an optional argument was added to allow the specification of a world.

The command can now also be run by the console as long as when teleporting to a location a world is specified.

The new commands are as follows:

Command Usage
/teama teleport team \<team> Teleports the team to the command issuer's location. Must be run by a player
/teama teleport team \<team> home Teleports the team to their team home if they have one
/teama teleport team \<team> location \<x> \<y> \<z> [yaw|world] [pitch] [world] Teleports the team to the location. If using from console the world argument is required
/teama teleport team \<team> player \<player> Teleports the team to the specified player
/teama teleport all Teleports all teams to the issuer's location. Must be run by a player
/teama teleport all home Teleports all teams to their team home if they have one
/teama teleport all location \<x> \<y> \<z> [yaw|world] [pitch] [world] Teleports all teams to the location. If using from console the world argument is required
/teama teleport all player \<player> Teleports all teams to the specified player
EarthCow commented 7 months ago

Thanks for the review and the suggested changes. I agree that would be much better. I'll look into it when I have time, maybe tonight.

EarthCow commented 7 months ago

Just to make sure we're on the same page would the commands we're adding look like this?

booksaw commented 7 months ago

Yeah that looks good, if you can think of something that is better then please go ahead with it, I'm just not a big fan of the ":all" notation as I think that may confuse less experienced users as its not something that is common in other plugins.

EarthCow commented 7 months ago

Yeah I understand. I reworked the code and added the subcommands. It is still somewhat complex and I don't know what to do about the argument list. I may revisit the tab completion method to try and clarify the code, however this is a working implementation. You'll have to let me know what you think.

EarthCow commented 7 months ago

I also added console support with the requirement of a specified world in that commit (6d1675e).

EarthCow commented 7 months ago

Thank you. I'm glad you like it and it's good to know users will find it useful.

imnltsa commented 7 months ago

This helps me and my grandmother play