mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Added back button to ItemEdition
(Also configured pom.xml to encode AltChar.java properly)
This commit is contained in:
parent
a3b5420f58
commit
9464adee21
7
pom.xml
7
pom.xml
@ -11,6 +11,11 @@
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<junitArtifactName>junit:junit</junitArtifactName>
|
||||
<encoding>UTF-8</encoding>
|
||||
<inputEncoding>UTF-8</inputEncoding>
|
||||
<outputEncoding>UTF-8</outputEncoding>
|
||||
<argLine>-ea -Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@ -218,5 +223,7 @@
|
||||
<properties>
|
||||
<downloadSources>false</downloadSources>
|
||||
<downloadJavadocs>false</downloadJavadocs>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
</project>
|
@ -83,7 +83,7 @@ public class ItemEdition extends EditionInventory {
|
||||
previousMeta.setDisplayName(ChatColor.GREEN + "Previous Page");
|
||||
previous.setItemMeta(previousMeta);
|
||||
|
||||
addEditionInventoryItems(inv, false);
|
||||
addEditionInventoryItems(inv, true);
|
||||
|
||||
while (n < slots.length)
|
||||
inv.setItem(slots[n++], glass);
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import net.Indyuce.mmoitems.MMOUtils;
|
||||
import net.Indyuce.mmoitems.api.Type;
|
||||
import net.Indyuce.mmoitems.api.util.AltChar;
|
||||
import net.Indyuce.mmoitems.gui.ItemBrowser;
|
||||
import net.Indyuce.mmoitems.gui.PluginInventory;
|
||||
import net.Indyuce.mmoitems.gui.edition.AdvancedRecipeEdition;
|
||||
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
|
||||
@ -43,8 +44,10 @@ public class GuiListener implements Listener {
|
||||
|
||||
Type type = ((EditionInventory) inventory).getItemType();
|
||||
String id = ((EditionInventory) inventory).getItemId();
|
||||
if (item.getItemMeta().getDisplayName().equals(ChatColor.GREEN + AltChar.rightArrow + " Back"))
|
||||
new ItemEdition(player, type, id).open();
|
||||
if (item.getItemMeta().getDisplayName().equals(ChatColor.GREEN + AltChar.rightArrow + " Back")) {
|
||||
if(inventory instanceof ItemEdition) new ItemBrowser(player, type).open();
|
||||
else new ItemEdition(player, type, id).open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user