Use Server variable instead of using Plugin#getServer();

You have an un-used server variable, which you should use in the code shown.
I have provided the fixes/additions.