LifeMC/LifeSkript

Give warnings when using execute console command for things already Skript have

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.
Give warnings when using execute console command for things already Skript have. For example, execute console command "eco give %player% 1000" can be replaced with a more readable and idiomatic way: add 1000 to player's money. This also has better performance.

Describe the solution you'd like
Giving warnings should be fine. However, in future, we might add an auto fixer for small tasks, that fixes a given warning, e.g the newly added redundant string conversion warning. It is easy to fix, but if we have lots of script, it might take time. It might be great to have IDE like features like this.

Describe alternatives you've considered
Not only Vault - Give command and some other things can be replaced. But most laggy version is economy. Because economy transactions are already slow, running them from a Bukkit command through main server thread makes it more slow.

Additionally everyone knows executing a command generates a overhead, since it triggers events, and plugins listen to them. Directly using Skript's Vault Hook functions is the more performance friendly and idiomatic way.

Additional information
As said above - In future, we also might be interested to implement an optimizer and/or quick fixer for most common warnings and/or errors.