Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NameCorrector 1.0.0#build010

Let the whole world join, whatever names they use

This plugin provides a public API function:

PHP:
public string \NameCorrector\NameCorrector::correctName(string name);
Example:

PHP:
/** @var \pocketmine\Server $server the PocketMine Server instance, often retrieved using $this->getServer() in plugin main classes */
/** @var string $old the uncorrected name */
$nameCorrector $server->getPluginManager()->getPlugin("NameCorrector");
if(
$nameCorrector instanceof \NameCorrector\NameCorrector and $nameCorrector->isEnabled()){
$new $nameCorrector->correctName($old);
// TODO handle success: the corrected version of $old is now stored in $new
}else{
// TODO handle error: NameCorrector is not enabled
}
Thanks to Samuel for testing and designing the icon!
Advertisement