public function __construct(NetherWorld $plugin) { if (self::$instance == null) { self::$instance = $this; } $this->plugin = $plugin; $this->loader = $plugin->getLocationLoader(); $this->server = Server::getInstance(); }
/** * Create a default setting * * @param string $userName */ public function loadLocation($userName) { $userName = strtolower($userName); $alpha = substr($userName, 0, 1); if (isset($this->users[$userName])) { return $this->users[$userName]; } if (!file_exists($this->plugin->getDataFolder() . "player/")) { @mkdir($this->plugin->getDataFolder() . "player/"); } return $this->users[$userName] = new LocationData($userName, $this->plugin->getDataFolder() . "player/"); }