mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-04 00:23:23 +01:00
Merge pull request #155 from DeadSilenceIV/master
AdvancedChests hook was updated to support the new API version.
This commit is contained in:
commit
bf5906b4ec
2
pom.xml
2
pom.xml
@ -264,7 +264,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.DeadSilenceIV</groupId>
|
<groupId>com.github.DeadSilenceIV</groupId>
|
||||||
<artifactId>AdvancedChestsAPI</artifactId>
|
<artifactId>AdvancedChestsAPI</artifactId>
|
||||||
<version>2.4</version>
|
<version>2.9-BETA</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ public class AdvancedChestsHook {
|
|||||||
|
|
||||||
public boolean handleAChestSortingIfPresent(Location location){
|
public boolean handleAChestSortingIfPresent(Location location){
|
||||||
if(!plugin.isHookAdvancedChests())return false;
|
if(!plugin.isHookAdvancedChests())return false;
|
||||||
AdvancedChest chest = AdvancedChestsAPI.getChestManager().getAdvancedChest(location);
|
AdvancedChest<?,?> chest = AdvancedChestsAPI.getChestManager().getAdvancedChest(location);
|
||||||
if(chest != null){
|
if(chest != null){
|
||||||
for (ChestPage page : chest.getPages()) {
|
for (ChestPage<?> page : chest.getPages()) {
|
||||||
Inventory inventory = page.getBukkitInventory();
|
Inventory inventory = page.getBukkitInventory();
|
||||||
plugin.getOrganizer().sortInventory(inventory,0,inventory.getSize()-10);
|
plugin.getOrganizer().sortInventory(inventory,0,inventory.getSize()-10);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user