-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename Json...Configuration to Json...Data and add JsonShopData cache
- Loading branch information
1 parent
6371430
commit e2d0a16
Showing
6 changed files
with
73 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/shanerx/tradeshop/shop/listeners/ChunkUnloadListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.shanerx.tradeshop.shop.listeners; | ||
|
||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.world.ChunkUnloadEvent; | ||
import org.shanerx.tradeshop.TradeShop; | ||
import org.shanerx.tradeshop.shoplocation.ShopChunk; | ||
|
||
public class ChunkUnloadListener implements Listener { | ||
|
||
private TradeShop plugin; | ||
|
||
public ChunkUnloadListener(TradeShop plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
@EventHandler | ||
public void onChunkUnload(ChunkUnloadEvent e) { | ||
ShopChunk shopChunk = new ShopChunk(e.getChunk()); | ||
TradeShop.getPlugin().getVarManager().getDataStorage().dropShopData(shopChunk); | ||
} | ||
} |