-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from EndlessCodeGroup/release/2.4.1
2.4.1
- Loading branch information
Showing
13 changed files
with
169 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pluginVersion=2.4.0 | ||
pluginVersion=2.4.1 | ||
pluginDesc=Change inventory how you need | ||
url=https://gitlab.com/endlesscodegroup/rpginventory/rpginventory | ||
url=https://github.com/EndlessCodeGroup/RPGInventory | ||
|
||
org.gradle.caching=true |
Binary file not shown.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
38 changes: 38 additions & 0 deletions
38
src/main/java/ru/endlesscode/rpginventory/compat/mimic/RPGInventoryPlayerInventory.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,38 @@ | ||
package ru.endlesscode.rpginventory.compat.mimic; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.jetbrains.annotations.NotNull; | ||
import ru.endlesscode.mimic.inventory.BukkitPlayerInventory; | ||
import ru.endlesscode.rpginventory.api.InventoryAPI; | ||
import ru.endlesscode.rpginventory.inventory.slot.Slot; | ||
import ru.endlesscode.rpginventory.inventory.slot.SlotManager; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@SuppressWarnings("UnstableApiUsage") | ||
public class RPGInventoryPlayerInventory extends BukkitPlayerInventory { | ||
|
||
public RPGInventoryPlayerInventory(@NotNull Player player) { | ||
super(player); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public List<ItemStack> getEquippedItems() { | ||
List<ItemStack> passiveItems = InventoryAPI.getPassiveItems(getPlayer()); | ||
return collectEquippedItems(passiveItems); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public List<ItemStack> getStoredItems() { | ||
List<Slot> quickSlots = SlotManager.instance().getQuickSlots(); | ||
|
||
return collectStoredItems() | ||
.stream() | ||
.filter(item -> quickSlots.stream().noneMatch(slot -> slot.isCup(item))) | ||
.collect(Collectors.toList()); | ||
} | ||
} |
Oops, something went wrong.