Skip to content

Commit

Permalink
Replace GuiUtils to PanelUtils class.
Browse files Browse the repository at this point in the history
Add PanelUtils dependency to the MCG.
  • Loading branch information
BONNe committed Feb 3, 2022
1 parent 34caf93 commit 4eca20a
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 359 deletions.
32 changes: 28 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<powermock.version>2.0.2</powermock.version>
<powermock.version>2.0.9</powermock.version>
<mockito.version>4.2.0</mockito.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.18-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.17.3</bentobox.version>
<bentobox.version>1.20.0-SNAPSHOT</bentobox.version>
<level.version>2.5.0</level.version>
<!-- Panel Utils version -->
<panelutils.version>1.0.0</panelutils.version>
<!-- Vault API version -->
<vault.version>1.7</vault.version>
<!-- Revision variable removes warning about dynamic version -->
Expand Down Expand Up @@ -137,7 +140,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.0.0</version>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -173,7 +176,12 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>18.0.0</version>
<version>22.0.0</version>
</dependency>
<dependency>
<groupId>lv.id.bonne</groupId>
<artifactId>panelutils</artifactId>
<version>${panelutils.version}</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -296,6 +304,22 @@
<version>3.3.1-SNAPSHOT</version>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>lv.id.bonne:panelutils:*</include>
</includes>
</artifactSet>
<transformers>
<!-- Add a transformer to exclude any other manifest files (possibly from dependencies). -->
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
<resource>MANIFEST.MF</resource>
</transformer>
<!-- Add a transformer to include your custom manifest file. -->
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/MANIFEST.MF</resource>
<file>src/main/resources/META-INF/MANIFEST.MF</file>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
import org.bukkit.Material;
import org.bukkit.World;

import lv.id.bonne.panelutils.PanelUtils;
import world.bentobox.bentobox.api.panels.PanelItem;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.magiccobblestonegenerator.StoneGeneratorAddon;
import world.bentobox.magiccobblestonegenerator.panels.CommonPanel;
import world.bentobox.magiccobblestonegenerator.panels.ConversationUtils;
import world.bentobox.magiccobblestonegenerator.panels.GuiUtils;
import world.bentobox.magiccobblestonegenerator.utils.Constants;
import world.bentobox.magiccobblestonegenerator.utils.Utils;

Expand Down Expand Up @@ -59,7 +59,7 @@ public void build()
user(this.user).
name(this.user.getTranslation(Constants.TITLE + "admin-panel"));

GuiUtils.fillBorder(panelBuilder, Material.MAGENTA_STAINED_GLASS_PANE);
PanelUtils.fillBorder(panelBuilder, Material.MAGENTA_STAINED_GLASS_PANE);

panelBuilder.item(10, this.createButton(Action.MANAGE_USERS));
panelBuilder.item(28, this.createButton(Action.WIPE_USER_DATA));
Expand Down

0 comments on commit 4eca20a

Please sign in to comment.