Hi there, is there any way to changing the format message when a command does not exist. Exampe: /abcdefg Message: Server> Oops, that command does not exist. Would be even better if there was a plugin for this lol.
Two options I am aware of: 1) Intercept commands at a high priority in your plugin and replace the message then. This is probably less reliable and hacky. 2) Edit your pocketmine language file to suit your needs. This would require extracting PocketMine if you use a phar, and repharing it in that case, but it will be way less hacky and far more reliable.
I would think HIGHEST priority would be better along with a check to make sure the event isn't already cancelled
So I am going to buy a VPS server since my hoster doesn't take paypal anymore. So how exactly can I change the Pocketmine Language?
Extract the PocketMine-MP.phar if you use a phar, edit the language files, and recompile it into a phar? Or, you can just run it from the source.
I'm not certain, but I believe you do it using doc comments, like this: PHP: /** * The event handler sends events to each listener in varying order based on priority. * I believe HIGHEST is last, except for MONITOR, which should be left for use by the server. * @var EntityDamageByEntityEvent $event * @priority (LOWEST, LOW, NORMAL, HIGH, HIGHEST, etc.) */ public function onDamage(EntityDamageEvent $event) { //Blah blah }
In the source folder. The path should be pocketmine\lang\locale\eng.ini if you use the English language.