How would could I make it where it pops up a tip on the side of the screen and says "Time: ###Minutes"
PHP: public $registry = [];onPlayerJoin$this->registry[$player->getName()] = time();Timer$player->sendTip(format(time() - $this->registry[$player->getName()]));function format(int $time) : string { return floor($time / 60).":".($time % / 60);} You will also need to save the registry somewhere. PHP: (new Config($plugin->getDataFolder()."registry.yml", Config::YAML, $this->registry))->save();// And load$this->registry = (new Config($plugin->getDataFolder()."registry.yml", Config::YAML, $this->registry))->getAll();
wouldnt that clash with first register/seen by plugin date? as i could log on, play 3 min, log off for 1 day and play 1 hour my time should be 1 hour 3 min, not 1 hour because you didnt account for someone might already have played but ill blame this on OP for not giving details
I made some sort of attempt of the plugin, for my server might make it public. We also have to take in that, the players time resets on server restart