mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-13 13:30:06 +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>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.8</source>
|
||||||
<target>1.8</target>
|
<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>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
@ -218,5 +223,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<downloadSources>false</downloadSources>
|
<downloadSources>false</downloadSources>
|
||||||
<downloadJavadocs>false</downloadJavadocs>
|
<downloadJavadocs>false</downloadJavadocs>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
@ -83,7 +83,7 @@ public class ItemEdition extends EditionInventory {
|
|||||||
previousMeta.setDisplayName(ChatColor.GREEN + "Previous Page");
|
previousMeta.setDisplayName(ChatColor.GREEN + "Previous Page");
|
||||||
previous.setItemMeta(previousMeta);
|
previous.setItemMeta(previousMeta);
|
||||||
|
|
||||||
addEditionInventoryItems(inv, false);
|
addEditionInventoryItems(inv, true);
|
||||||
|
|
||||||
while (n < slots.length)
|
while (n < slots.length)
|
||||||
inv.setItem(slots[n++], glass);
|
inv.setItem(slots[n++], glass);
|
||||||
|
@ -11,6 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import net.Indyuce.mmoitems.MMOUtils;
|
import net.Indyuce.mmoitems.MMOUtils;
|
||||||
import net.Indyuce.mmoitems.api.Type;
|
import net.Indyuce.mmoitems.api.Type;
|
||||||
import net.Indyuce.mmoitems.api.util.AltChar;
|
import net.Indyuce.mmoitems.api.util.AltChar;
|
||||||
|
import net.Indyuce.mmoitems.gui.ItemBrowser;
|
||||||
import net.Indyuce.mmoitems.gui.PluginInventory;
|
import net.Indyuce.mmoitems.gui.PluginInventory;
|
||||||
import net.Indyuce.mmoitems.gui.edition.AdvancedRecipeEdition;
|
import net.Indyuce.mmoitems.gui.edition.AdvancedRecipeEdition;
|
||||||
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
|
import net.Indyuce.mmoitems.gui.edition.EditionInventory;
|
||||||
@ -43,8 +44,10 @@ public class GuiListener implements Listener {
|
|||||||
|
|
||||||
Type type = ((EditionInventory) inventory).getItemType();
|
Type type = ((EditionInventory) inventory).getItemType();
|
||||||
String id = ((EditionInventory) inventory).getItemId();
|
String id = ((EditionInventory) inventory).getItemId();
|
||||||
if (item.getItemMeta().getDisplayName().equals(ChatColor.GREEN + AltChar.rightArrow + " Back"))
|
if (item.getItemMeta().getDisplayName().equals(ChatColor.GREEN + AltChar.rightArrow + " Back")) {
|
||||||
new ItemEdition(player, type, id).open();
|
if(inventory instanceof ItemEdition) new ItemBrowser(player, type).open();
|
||||||
|
else new ItemEdition(player, type, id).open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user