Modified HPM Hook Caching

Dropped hard-coded indexes, will make updates of the file in the future be smaller and much more clear in content.
Made Possible Thanks to Haruna <3

Signed-off-by: shennetsind <ind@henn.et>
Merge branch 'master' of https://github.com/HerculesWS/Hercules