forked from Ad5001/PlayerSelectors
Fixing a typo.
Well, I'll never code at midnight again...
This commit is contained in:
parent
c027a1712a
commit
1bd147133c
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ class Main extends PluginBase implements Listener {
|
||||||
foreach($commandsToExecute as $index => $cmd){
|
foreach($commandsToExecute as $index => $cmd){
|
||||||
// Foreaching the returning commands to push them to the new commands to be executed at the next run.
|
// Foreaching the returning commands to push them to the new commands to be executed at the next run.
|
||||||
foreach(self::$selectors[$matches[1][$index]]->applySelector($sender, $params) as $selectorStr){
|
foreach(self::$selectors[$matches[1][$index]]->applySelector($sender, $params) as $selectorStr){
|
||||||
if(strpos($selectorStr, " ") !== -1) $selectorStr = explore($selectorStr)[count(explode($selectorStr)) - 1]; // Name w/ spaces. Match the nearest name in the player. Not perfect :/
|
if(strpos($selectorStr, " ") !== -1) $selectorStr = explode($selectorStr)[count(explode($selectorStr)) - 1]; // Name w/ spaces. Match the nearest name in the player. Not perfect :/
|
||||||
$newCommandsToExecute[] = substr_replace($cmd, " " . $selectorStr . " ", strpos($cmd, $match), strlen($match));
|
$newCommandsToExecute[] = substr_replace($cmd, " " . $selectorStr . " ", strpos($cmd, $match), strlen($match));
|
||||||
}
|
}
|
||||||
if(count($newCommandsToExecute) == 0) {
|
if(count($newCommandsToExecute) == 0) {
|
||||||
|
@ -179,4 +179,4 @@ class Main extends PluginBase implements Listener {
|
||||||
public static function getSelector(string $selChar): Selector{
|
public static function getSelector(string $selChar): Selector{
|
||||||
return self::$selectors[$selChar];
|
return self::$selectors[$selChar];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue