Merge pull request #155 from DeadSilenceIV/master

AdvancedChests hook was updated to support the new API version.
This commit is contained in:
mfnalex 2022-07-06 09:24:17 +03:00 committed by GitHub
commit bf5906b4ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -264,7 +264,7 @@
<dependency>
<groupId>com.github.DeadSilenceIV</groupId>
<artifactId>AdvancedChestsAPI</artifactId>
<version>2.4</version>
<version>2.9-BETA</version>
<scope>provided</scope>
</dependency>

View File

@ -45,9 +45,9 @@ public class AdvancedChestsHook {
public boolean handleAChestSortingIfPresent(Location location){
if(!plugin.isHookAdvancedChests())return false;
AdvancedChest chest = AdvancedChestsAPI.getChestManager().getAdvancedChest(location);
AdvancedChest<?,?> chest = AdvancedChestsAPI.getChestManager().getAdvancedChest(location);
if(chest != null){
for (ChestPage page : chest.getPages()) {
for (ChestPage<?> page : chest.getPages()) {
Inventory inventory = page.getBukkitInventory();
plugin.getOrganizer().sortInventory(inventory,0,inventory.getSize()-10);
}