mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
Vignette
This commit is contained in:
parent
09da93710b
commit
c3c0539736
@ -46,6 +46,12 @@
|
||||
<version>6.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.erethon.vignette</groupId>
|
||||
<artifactId>vignette-dist</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.dre2n</groupId>
|
||||
<artifactId>commandsxl</artifactId>
|
||||
|
@ -17,7 +17,6 @@
|
||||
package de.erethon.dungeonsxl.reward;
|
||||
|
||||
import de.erethon.caliburn.item.VanillaItem;
|
||||
import de.erethon.commons.gui.PageGUI;
|
||||
import de.erethon.dungeonsxl.DungeonsXL;
|
||||
import de.erethon.dungeonsxl.config.DMessage;
|
||||
import de.erethon.dungeonsxl.player.DGlobalPlayer;
|
||||
@ -25,6 +24,8 @@ import de.erethon.dungeonsxl.player.DPermission;
|
||||
import de.erethon.dungeonsxl.world.DEditWorld;
|
||||
import de.erethon.dungeonsxl.world.DGameWorld;
|
||||
import de.erethon.dungeonsxl.world.block.RewardChest;
|
||||
import de.erethon.vignette.api.PaginatedInventoryGUI;
|
||||
import de.erethon.vignette.api.component.InventoryButton;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Chest;
|
||||
@ -121,10 +122,12 @@ public class RewardListener implements Listener {
|
||||
if (dPlayer.hasRewardItemsLeft() && !VanillaItem.NETHER_PORTAL.is(block.getRelative(0, 1, 0)) && !VanillaItem.NETHER_PORTAL.is(block.getRelative(0, -1, 0))
|
||||
&& !VanillaItem.NETHER_PORTAL.is(block.getRelative(1, 0, 0)) && !VanillaItem.NETHER_PORTAL.is(block.getRelative(-1, 0, 0))
|
||||
&& !VanillaItem.NETHER_PORTAL.is(block.getRelative(0, 0, 1)) && !VanillaItem.NETHER_PORTAL.is(block.getRelative(0, 0, -1))) {
|
||||
PageGUI lootInventory = new PageGUI(DMessage.PLAYER_TREASURES.getMessage(), true);
|
||||
PaginatedInventoryGUI lootInventory = new PaginatedInventoryGUI(DMessage.PLAYER_TREASURES.getMessage());
|
||||
for (ItemStack item : dPlayer.getRewardItems()) {
|
||||
if (item != null) {
|
||||
lootInventory.addButton(item);
|
||||
InventoryButton button = new InventoryButton(item);
|
||||
button.setStealable(true);
|
||||
lootInventory.add(button);
|
||||
}
|
||||
}
|
||||
lootInventory.open(player);
|
||||
|
15
dist/pom.xml
vendored
15
dist/pom.xml
vendored
@ -26,7 +26,8 @@
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>de.erethon:caliburn</include>
|
||||
<include>de.erethon:commons</include>
|
||||
<include>de.erethon.commons:commons-dist</include>
|
||||
<include>de.erethon.vignette:vignette-dist</include>
|
||||
<include>de.erethon.dungeonsxl:*</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
@ -54,9 +55,15 @@
|
||||
<version>0.5.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.erethon</groupId>
|
||||
<artifactId>commons</artifactId>
|
||||
<version>5.1.5</version>
|
||||
<groupId>de.erethon.vignette</groupId>
|
||||
<artifactId>vignette-dist</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.erethon.commons</groupId>
|
||||
<artifactId>commons-dist</artifactId>
|
||||
<version>6.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user