But could you explain me how i can make like a list of players that are muted? like if i do /mute player1 that player1 even if disconect's and reconnect he will be mutted until i do /unmute player1
You can put the player into an array. Spoiler: Code, only look if you're sure you have no clue how it works PHP: // In the classprivate $mutedPlayers = [];// In the mute command$this->mutedPlayers[] = $playerName;// In the unmute commandunset($this->mutedPlayers[$playerName]);// In the PlayerChatEvent handler$playerName = $event->getPlayer()->getName();if (in_array($playerName, $this->mutedPlayers)) { $event->setCancelled(true);} In order to keep it persistent across server reboots, you will need to save the player data somewhere. Spoiler: Code, only look if you're sure you have no clue how it works PHP: // in onEnableif ($this->getConfig()->get("mutedPlayers")) { $this->mutedPlayers = $this->getConfig()->get("mutedPlayers");}// in onDisable$this->getConfig()->set("mutedPlayers", array_values($this->mutedPlayers));$this->getConfig()->save();// array_values because using unset messes up the keys