SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
77 stars 29 forks source link

Fix prefix and suffix, commands execution otimization. #15

Open rube200 opened 4 years ago

rube200 commented 4 years ago

About permissions; It should do some checks before starting call functions that will not be used in some cases. Example:

IRocketCommand command = R.Commands.GetCommand(requestedCommand);
double cooldown = R.Commands.GetCooldown(player, command);

If the command does not exist, rocketmod should not call GetCooldown.

About prefixes and suffixes: i changed the event from Provider.onCheckValid to Provider.onCheckValidWithExplanation and some otimizations.

btw rocketmod currently listen Provider.onCheckValidWithExplanation so Provider.onCheckValid is never called

SDGNelson commented 4 years ago

This sounds like a good change, especially fixing the usage of onCheckValid. Will examine further soon.