Browse Source

Removing debug

pull/5/merge
Ad5001 2 years ago
parent
commit
8fa2835dcd
2 changed files with 1 additions and 5 deletions
  1. +0
    -1
      src/Ad5001/PlayerSelectors/Main.php
  2. +1
    -4
      src/Ad5001/PlayerSelectors/selector/AllPlayers.php

+ 0
- 1
src/Ad5001/PlayerSelectors/Main.php View File

@@ -80,7 +80,6 @@ class Main extends PluginBase implements Listener {
foreach($matches[0] as $index => $match){
if(isset(self::$selectors[$matches[1][$index]])){ // Does the selector exist?
// Search for the parameters
echo $matches[1][$index];
$params = self::$selectors[$matches[1][$index]]->acceptsModifiers() ? $this->checkArgParams($matches, $index): [];
// Applying the selector
$newCommandsToExecute = [];


+ 1
- 4
src/Ad5001/PlayerSelectors/selector/AllPlayers.php View File

@@ -36,10 +36,7 @@ class AllPlayers extends Selector{
foreach(Server::getInstance()->getOnlinePlayers() as $p){
if($params["c"] !== 0 && count($return) == $params["c"]) break; // Too much players
if($p->getLevel()->getName() !== $params["lvl"] && $params["lvl"] !== "") break; // Not in the right level
if(!$this->checkDefaultParams($p, $params)) {
echo "Not checked param";
break;
}
if(!$this->checkDefaultParams($p, $params)) break;
$return[] = $p->getName();
}
return $return;


Loading…
Cancel
Save