Skip to content

Commit

Permalink
Fixed shops not working after reload command, closes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
onebone committed Jan 25, 2015
1 parent d7c39ae commit 3696e98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions EconomyAPI/src/onebone/economyapi/EconomyAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ public static function getInstance(){
}

public function onLoad(){
if(!self::$obj instanceof EconomyAPI){
self::$obj = $this;
}
self::$obj = $this;

$this->path = $this->getDataFolder();

$this->scheduleId = array();
Expand Down
1 change: 0 additions & 1 deletion EconomyShop/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ api:
main: onebone\economyshop\EconomyShop
author: onebone
depend: [EconomyAPI]
load: POSTWORLD

permissions:
economyshop.*:
Expand Down
6 changes: 2 additions & 4 deletions EconomyShop/src/onebone/economyshop/EconomyShop.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,15 @@ class EconomyShop extends PluginBase implements Listener{
private static $instance;

public function onEnable(){
if(self::$instance instanceof EconomyShop){
return;
}
self::$instance = $this;
@mkdir($this->getDataFolder());
$this->shop = (new Config($this->getDataFolder()."Shops.yml", Config::YAML))->getAll();
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->prepareLangPref();
$this->placeQueue = array();

ItemList::$items = (new Config($this->getDataFolder()."items.properties", Config::PROPERTIES, ItemList::$items))->getAll();

self::$instance = $this;
}

public function getShops(){
Expand Down

0 comments on commit 3696e98

Please sign in to comment.