Skip to content

Commit

Permalink
TrashPack fix
Browse files Browse the repository at this point in the history
LoadBefore for SlimeCustomizer
  • Loading branch information
Sefiraat committed Jul 27, 2021
1 parent 09364d6 commit 6a7d8cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.sefiraat</groupId>
<artifactId>DankTech</artifactId>
<version>1.2.8</version>
<version>1.2.9</version>

<build>
<plugins>
Expand Down Expand Up @@ -91,7 +91,6 @@
</plugin>



</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static GuiItem guiPackLockedSlot() {
g.setAction(event -> event.setCancelled(true));
return g;
}

public static GuiItem guiUnassignedSlot() {
ItemStack guiSkull = SkullCreator.itemFromBase64(Materials.DANK_GUI_EMPTY);
GuiItem g = ItemBuilder.skull(guiSkull).asGuiItem();
Expand All @@ -75,6 +76,7 @@ public static GuiItem guiUnassignedSlot() {
g.setAction(event -> event.setCancelled(true));
return g;
}

public static GuiItem guiPackAssignedSlot(@Nonnull Long dankID, @Nonnull Integer slot) {
ItemStack i = DankTech.getInstance().getDankStorageConfig().getItemStack(CONFIG_GETTER_SECTION_DANK_ID + "." + dankID + "." + CONFIG_GETTER_VAL_SLOT + slot + "." + CONFIG_GETTER_VAL_STACK);
assert i != null;
Expand All @@ -86,7 +88,7 @@ public static GuiItem guiPackAssignedSlot(@Nonnull Long dankID, @Nonnull Integer
public static GuiItem guiTrashAssignedSlot(@Nonnull Long trashId, @Nonnull Integer slot) {
ItemStack i = DankTech.getInstance().getDankStorageConfig().getItemStack(CONFIG_GETTER_SECTION_TRASH_ID + "." + trashId + "." + CONFIG_GETTER_VAL_SLOT + slot + "." + CONFIG_GETTER_VAL_STACK);
assert i != null;
GuiItem g = ItemBuilder.from(i).asGuiItem();
GuiItem g = ItemBuilder.from(i.clone()).asGuiItem();
g.setAction(event -> event.setCancelled(true));
return g;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: DankTech
version: 1.2.8
version: 1.2.9
main: io.github.sefiraat.danktech.DankTech
api-version: 1.16
softdepend: [Slimefun, mcMMO]
loadbefore: [SlimeCustomizer]
permissions:
danktech.admin:
description: Allows access to /danktech and to bypass world restrictions

0 comments on commit 6a7d8cd

Please sign in to comment.