HELLO PMMP MEMBERS! I need a plugin that will give a player a money reward if he logs in everyday (24 hours) I know there is a daily reward plugin but I want it when the player logs in every 24 hours he/she gets a money reward set in the config.
Not completed, but you'd probably want something like this. https://github.com/SOF3/simple-plugins/tree/master/DailyReward
Try this https://poggit.pmmp.io/ci/SOF3/simple-plugins/DailyReward If Poggit is not online, see the source code on GitHub instead: https://github.com/SOF3/simple-plugins/tree/master/DailyReward/
Hey have a look at mine too!! https://github.com/ThunderDoesPlugins/DailyRewards (seems more messy then sofe's) this now bugs me how sofe's version have an actions range fliter which mine lack of it Damm it, sofe have proven me that i just cant over done and over complicate things
Now you see that separating your code into different files doesn't necessary make anything better I totally don't understand why you would write 56 + 23 = 79 lines of code just to do something that can done simply by changing your onClaimCommand signature to the default onCommand() and these 4 lines into plugin.yml. Want to register aliases? Fine, just play with the commands API and $this->getCommand()! Why write so much extra work, especially when you don't expect this plugin to have too many commands or very complicated structure? Same with your EventListener -- again I don't understand why you don't just make your main class the event listener when you are eventually implementing the handler there. All the other files are just unnecessary code that eventually points back to the main class. This is the age where you have to learn to implement minimalism where necessary and spend time on something more meaningful.
i understand it dosent make anything better but mostly laziness of just using the base structure that it came with where if i could spend some more time PHPstorm could probably automate it better then me copying folders when i make a new plugin i guess i should do something with that when i am not so lazy but class otherwise Main is still quite littered with functions
Indeed, the plugin hasn't been completed. There are a lot of bugs in it.( I guess that SOFe just didn't test the code) onJoin() doesn't have $player so that dispatchActions() crashed. Timezone is not configuable yet. dispatchCommand() loses a lot of thing, also crashed. When the player have joined the server many times a day, the plugin will continue to count the days. Maybe I can help to fix.If I have time.(There will be a big exam on January)